smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.06k stars 1.01k forks source link

Getting warnings in logs #1308

Open kaizersoje opened 2 months ago

kaizersoje commented 2 months ago

Home Assistant version 2024.8.3

SmartIR version 1.17.9

SmartIR configuration


Add configuration here

Describe the bug

A clear and concise description of what the bug is. I can see this warning in the logs after upgrading to 2024.8.3

Debug log

2024-08-28 03:30:37.067 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/climate/1291.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/setup.py", line 165, in async_setup_component
result = await _async_setup_component(hass, domain, config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in _async_setup_component
result = await task
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 155, in async_setup
await component.async_setup(config)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 148, in async_setup
self.hass.async_create_task_internal(
File "/usr/src/homeassistant/homeassistant/core.py", line 830, in async_create_task_internal
task = create_eager_task(target, name=name, loop=self.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 "/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:
File "/config/custom_components/smartir/climate.py", line 85, in async_setup_platform
2024-08-28 03:30:37.122 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-08-28 03:30:37.137 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
2024-08-28 03:30:37.150 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 191: async_track_state_change(self.hass, self._power_sensor,, please report it to the author of the 'smartir' custom integration
2024-08-28 03:30:37.098 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-08-28 03:30:37.098 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-08-28 03:30:37.098 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

Additional context

Add any other context about the problem here.

Bellavista commented 2 months ago

Hi! same error for a custom my device 6666.json

2024-08-28 19:48:44.459 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/climate/6666.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:
o-mega commented 2 months ago

Similar deprecation notices here:

2024-08-29 16:49:12.836 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-08-29 16:49:12.838 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-08-29 16:49:12.840 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-08-29 16:49:12.842 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-08-29 16:49:12.844 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-08-29 16:49:12.846 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-08-29 16:49:12.848 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-08-29 16:49:12.849 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-08-29 16:49:12.851 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
Bastiencc commented 1 month ago

same here +1

GermanCaruncho commented 1 month ago

more log for your control

2024-09-11 14:10:38.006 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-09-11 14:10:38.012 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-09-11 14:10:38.022 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-09-11 14:10:38.031 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-09-11 14:10:38.039 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-09-11 14:10:38.045 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-09-11 14:10:38.053 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-09-11 14:10:38.062 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-09-11 14:10:38.069 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-09-11 14:10:38.973 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/climate/1128.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 "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in 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 189, 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 308, in async_setup_platform await self._platforms[key].async_setup(platform_config, discovery_info) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 298, in async_setup await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, 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-09-11 14:10:38.980 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-09-11 14:10:38.981 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-09-11 14:10:38.981 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-09-11 14:10:38.981 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, cool, heat, 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-09-11 14:10:38.990 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-09-11 14:10:38.998 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 2024-09-11 14:10:39.074 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/smartir/codes/media_player/1060.json',) inside the event loop by custom integration 'smartir' at custom_components/smartir/media_player.py, line 75: with open(device_json_path) as j: (offender: /config/custom_components/smartir/media_player.py, line 75: 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 "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in 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 189, 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 308, in async_setup_platform await self._platforms[key].async_setup(platform_config, discovery_info) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 298, in async_setup await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/smartir/media_player.py", line 75, in async_setup_platform with open(device_json_path) as j:

2024-09-11 14:10:39.085 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.smartir.media_player.SmartIRMediaPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|PLAY_MEDIA|VOLUME_STEP|SELECT_SOURCE: 4024>, 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

lNOFXl commented 1 month ago

welp i was gonna add to these logs but i think the point has been put across already

litinoveweedle commented 3 weeks ago

Hello, just use my fork, it is maintained and all those issues are solved there: https://github.com/litinoveweedle/SmartIR

vassilis-panos commented 3 weeks ago

Hello, just use my fork, it is maintained and all those issues are solved there: https://github.com/litinoveweedle/SmartIR

Seriously? Please stop spam

litinoveweedle commented 3 weeks ago

Seriously? Then please maintain your repo and accept pending PRs. I did offer you my help in maintenance of this project, but without reply. So I did what I had to - fork and start doing maintenance work for users.

So if people are desperately seeking help here I am doing the best for them - point them to fork that actually works and is supported.

Cippo2019 commented 2 weeks ago

Hello, just use my fork, it is maintained and all those issues are solved there: https://github.com/litinoveweedle/SmartIR

Seriously? Please stop spam

HI Vassilis first of all thanks for your great job.

just to avoid confusion, the latest changed was done on 12/23. Do you think that maybe you will be able to solve the latest warning ?

just to know what we can do, wait or change repo.

so , only to clarify that :-)

thanks again !!