mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-10-30 15:07:53 +01:00
fix: unsubscribe config-entry listener on unload
This commit is contained in:
parent
283fec08ae
commit
f874d28853
1 changed files with 3 additions and 1 deletions
|
|
@ -106,7 +106,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
|
||||
# This will reload any changes the user made to any YAML configurations.
|
||||
# Called during 'quick reload' or hass.reload_config_entry
|
||||
hass.bus.async_listen("hass.config.entry_updated", reload_configuration_yaml)
|
||||
config_entry.async_on_unload(
|
||||
hass.bus.async_listen("hass.config.entry_updated", reload_configuration_yaml),
|
||||
)
|
||||
|
||||
undo_listener = config_entry.add_update_listener(async_update_options)
|
||||
data[config_entry.entry_id] = {UNDO_UPDATE_LISTENER: undo_listener}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue