claytonjn / hass-circadian_lighting

Circadian Lighting custom component for Home Assistant
Apache License 2.0
774 stars 89 forks source link

`async_track_state_change` deprecated #245

Open ctih opened 5 months ago

ctih commented 5 months ago

In Home Assistant new version the function used is deprecated. Could anyone look in to the issue before the release of this release?

Core 2024.5.0b0 Supervisor 2024.04.3 Operating System 12.2 Brugerflade 20240424.1

Logger: homeassistant.helpers.frame Kilde: helpers/frame.py:190 Første forekomst: 13.34.55 (4 forekomster) Senest logget: 13.35.01

Detected that custom integration 'circadian_lighting' 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/circadian_lighting/switch.py, line 234: async_track_state_change(, please create a bug report at https://github.com/claytonjn/hass-circadian_lighting/issues

AnthonyBe commented 5 months ago

Yeah, just saw this as well when I upgraded from 2024.4.4 to 2024.5.1 Got a year to fix it, but nice to have one less warning in the log file :)

2024-05-04 20:33:02.443 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'circadian_lighting' callsasync_track_state_changeinstead ofasync_track_state_change_eventwhich is deprecated and will be removed in Home Assistant 2025.5 at custom_components/circadian_lighting/switch.py, line 234: async_track_state_change(, please create a bug report at https://github.com/claytonjn/hass-circadian_lighting/issues