Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assitant Logs show SmartIR is using deprecated constants #1284

Open
viniciuscmartins opened this issue Jul 10, 2024 · 6 comments
Open

Comments

@viniciuscmartins
Copy link

Home Assistant:
Core 2024.6.4
Supervisor 2024.06.2
Operating System 12.4
Frontend 20240610.1

SmartIR: 1.17.9

Logs from Core:

Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:197
integration: Climate (documentation, issues)
First occurred: 1:58:46 PM (9 occurrences)
Last logged: 1:58:46 PM
HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration

@aheath70
Copy link

+1

2024-07-14 22:05:35.437 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.438 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.440 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_COOL was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.COOL instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.442 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_DRY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.DRY instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.444 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.447 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.449 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.450 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.452 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.804 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'bureau_of_meteorology' calls async_forward_entry_setup for integration, bureau_of_meteorology with title: Hampton and entry_id: acd0efa62c9f5209d211088bb3ebb2f1, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/bureau_of_meteorology/__init__.py, line 84: hass.async_create_task(, please create a bug report at https://github.com/bremor/bureau_of_meteorology/issues
2024-07-14 22:05:35.945 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/climate/1289.json',) inside the event loop by custom integration 'smartir' at custom_components/smartir/climate.py, line 85: with open(device_json_path) as j: (offender: /config/custom_components/smartir/climate.py, line 85: with open(device_json_path) as j:), please report it to the author of the 'smartir' custom integration
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 318, in async_setup_platform
    await self._platforms[key].async_setup(platform_config, discovery_info)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in async_setup
    await self._async_setup_platform(async_create_setup_awaitable)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    awaitable = create_eager_task(awaitable, loop=hass.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/config/custom_components/smartir/climate.py", line 85, in async_setup_platform
    with open(device_json_path) as j:

2024-07-14 22:05:35.949 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE: 9>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-07-14 22:05:35.950 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.950 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.950 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, heat, cool, dry, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.952 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'smartir' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 175: async_track_state_change(self.hass, self._temperature_sensor,, please report it to the author of the 'smartir' custom integration
2024-07-14 22:05:35.954 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'smartir' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 183: async_track_state_change(self.hass, self._humidity_sensor,, please report it to the author of the 'smartir' custom integration

@CuongHome
Copy link

Same here

Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:197
integration: Climate (documentation, issues)
First occurred: 20:28:31 (9 occurrences)
Last logged: 20:28:31

HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration

@Menelao147
Copy link

Same here

Registratore: homeassistant.helpers.entity
Fonte: helpers/entity.py:1637
Prima occorrenza: 10:47:58 (1 occorrenze)
Ultima registrazione: 10:47:58

Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1.
Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE|FAN_MODE|SWING_MODE: 41>, please report it to the author of the 'smartir' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

@litinoveweedle
Copy link

Hello, just use my repo, all those are solved there: https://github.com/litinoveweedle/SmartIR

@niorko
Copy link

niorko commented Oct 12, 2024

Hello, just use my repo, all those are solved there: https://github.com/litinoveweedle/SmartIR

Would you mind creating PR to the original repo? It would be really nice.

Thank you

@litinoveweedle
Copy link

I try to do that at beginning, but now there are to many changes and diverging philosophy. (Configuration changes, different format of the code files etc.) So now it is up to you as a user to choose which repo you would like to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants