Fix lingering timer in rfxtrx (#92461)

This commit is contained in:
epenet 2023-05-04 12:27:17 +02:00 committed by GitHub
parent 78da1168db
commit 95023ecf08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,6 +119,11 @@ class RfxtrxOffDelayMixin(Entity):
self._timeout()
self._timeout = None
async def async_will_remove_from_hass(self) -> None:
"""Run when entity will be removed from hass."""
self._cancel_timeout()
return await super().async_will_remove_from_hass()
class RfxtrxChime(RfxtrxCommandEntity, SirenEntity, RfxtrxOffDelayMixin):
"""Representation of a RFXtrx chime."""