nikshriv / cync_lights

Home Assistant Integration for controlling Cync switches, plugs, and bulbs
149 stars 50 forks source link

RuntimeError #96

Open MrJCleary opened 2 months ago

MrJCleary commented 2 months ago

This error originated from a custom integration.

Logger: custom_components.cync_lights.cync_hub Source: custom_components/cync_lights/cync_hub.py:106 integration: Cync Lights (documentation) First occurred: 4:04:04 PM (2 occurrences) Last logged: 4:04:20 PM

RuntimeError: Detected that custom integration 'cync_lights' calls async_write_ha_state from a thread at custom_components/cync_lights/cync_hub.py, line 638: self._update_callback(). Please report it to the author of the 'cync_lights' custom integration.

NUIT-Jim commented 1 month ago

also the following error:

None (<class 'custom_components.cync_lights.light.CyncRoomEntity'>) sets invalid supported color modes {<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.RGB: 'rgb'>, <ColorMode.BRIGHTNESS: 'brightness'>}, this will stop working in Home Assistant Core 2025.3, please report it to the author of the 'cync_lights' custom integration None (<class 'custom_components.cync_lights.light.CyncSwitchEntity'>) sets invalid supported color modes {<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.RGB: 'rgb'>, <ColorMode.BRIGHTNESS: 'brightness'>}, this will stop working in Home Assistant Core 2025.3, please report it to the author of the 'cync_lights' custom integration

jamesdlyn commented 4 days ago

This was fixed by changing all references to async_write_ha_state to schedule_update_ha_state instead in the following files:

binary_sensor.py fan.py light.py switch.py

This should be reflected by the commits on May 20, 2024, so if you are encountering issues, try updating and restarting.