mirror of
https://github.com/home-assistant/core.git
synced 2025-09-03 11:51:40 +02:00
Remove uneeded update listener from Idasen (#151243)
This commit is contained in:
@@ -34,7 +34,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: IdasenDeskConfigEntry) -
|
|||||||
raise ConfigEntryNotReady(f"Unable to connect to desk {address}") from ex
|
raise ConfigEntryNotReady(f"Unable to connect to desk {address}") from ex
|
||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def _async_bluetooth_callback(
|
def _async_bluetooth_callback(
|
||||||
@@ -64,13 +63,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: IdasenDeskConfigEntry) -
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
async def _async_update_listener(
|
|
||||||
hass: HomeAssistant, entry: IdasenDeskConfigEntry
|
|
||||||
) -> None:
|
|
||||||
"""Handle options update."""
|
|
||||||
await hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_unload_entry(hass: HomeAssistant, entry: IdasenDeskConfigEntry) -> bool:
|
async def async_unload_entry(hass: HomeAssistant, entry: IdasenDeskConfigEntry) -> bool:
|
||||||
"""Unload a config entry."""
|
"""Unload a config entry."""
|
||||||
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
||||||
|
Reference in New Issue
Block a user