Skip to content

Commit

Permalink
Fix lingering timer in samsungtv (home-assistant#91450)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Apr 16, 2023
1 parent dc03a5c commit bdb55a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/samsungtv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ async def async_call(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
await self._debounced_reload.async_call()

@callback
def async_cancel(self) -> None:
def async_shutdown(self) -> None:
"""Cancel any pending reload."""
self._debounced_reload.async_cancel()
self._debounced_reload.async_shutdown()

async def _async_reload_entry(self) -> None:
"""Reload entry."""
Expand Down Expand Up @@ -228,7 +228,7 @@ async def stop_bridge(event: Event) -> None:
# will be a race where the config flow will see the entry
# as not loaded and may reload it
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))

hass.data[DOMAIN][entry.entry_id] = bridge
Expand Down

0 comments on commit bdb55a4

Please sign in to comment.