mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix lingering timer in jewish_calendar (#92470)
This commit is contained in:
parent
a4a795e35b
commit
7dc5d131b4
@ -116,6 +116,13 @@ class JewishCalendarBinarySensor(BinarySensorEntity):
|
||||
await super().async_added_to_hass()
|
||||
self._schedule_update()
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Run when entity will be removed from hass."""
|
||||
if self._update_unsub:
|
||||
self._update_unsub()
|
||||
self._update_unsub = None
|
||||
return await super().async_will_remove_from_hass()
|
||||
|
||||
@callback
|
||||
def _update(self, now: datetime | None = None) -> None:
|
||||
"""Update the state of the sensor."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user