mirror of
https://github.com/home-assistant/core.git
synced 2025-06-05 05:37:04 +00:00
Fix assertion error when unloading ZHA with pollable entities (#107311)
This commit is contained in:
parent
2b43271c3b
commit
2ed9397611
@ -216,7 +216,7 @@ class PollableSensor(Sensor):
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Disconnect entity object when removed."""
|
||||
assert self._cancel_refresh_handle
|
||||
if self._cancel_refresh_handle is not None:
|
||||
self._cancel_refresh_handle()
|
||||
self._cancel_refresh_handle = None
|
||||
self.debug("stopped polling during device removal")
|
||||
|
Loading…
x
Reference in New Issue
Block a user