mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix lingering timer in samsungtv (#91450)
This commit is contained in:
parent
dc03a5c81e
commit
bdb55a4262
@ -166,9 +166,9 @@ class DebouncedEntryReloader:
|
|||||||
await self._debounced_reload.async_call()
|
await self._debounced_reload.async_call()
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_cancel(self) -> None:
|
def async_shutdown(self) -> None:
|
||||||
"""Cancel any pending reload."""
|
"""Cancel any pending reload."""
|
||||||
self._debounced_reload.async_cancel()
|
self._debounced_reload.async_shutdown()
|
||||||
|
|
||||||
async def _async_reload_entry(self) -> None:
|
async def _async_reload_entry(self) -> None:
|
||||||
"""Reload entry."""
|
"""Reload entry."""
|
||||||
@ -228,7 +228,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
# will be a race where the config flow will see the entry
|
# will be a race where the config flow will see the entry
|
||||||
# as not loaded and may reload it
|
# as not loaded and may reload it
|
||||||
debounced_reloader = DebouncedEntryReloader(hass, entry)
|
debounced_reloader = DebouncedEntryReloader(hass, entry)
|
||||||
entry.async_on_unload(debounced_reloader.async_cancel)
|
entry.async_on_unload(debounced_reloader.async_shutdown)
|
||||||
entry.async_on_unload(entry.add_update_listener(debounced_reloader.async_call))
|
entry.async_on_unload(entry.add_update_listener(debounced_reloader.async_call))
|
||||||
|
|
||||||
hass.data[DOMAIN][entry.entry_id] = bridge
|
hass.data[DOMAIN][entry.entry_id] = bridge
|
||||||
|
Loading…
x
Reference in New Issue
Block a user