Support reloading Tasmota config entries (#42097)

This commit is contained in:
Erik Montnemery 2020-10-23 01:22:51 +02:00 committed by GitHub
parent 3661035397
commit de35d58fd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 179 additions and 75 deletions

View file

@ -153,6 +153,12 @@ class TasmotaDiscoveryUpdate(TasmotaEntity):
)
)
@callback
def add_to_platform_abort(self) -> None:
"""Abort adding an entity to a platform."""
clear_discovery_hash(self.hass, self._discovery_hash)
super().add_to_platform_abort()
async def async_will_remove_from_hass(self) -> None:
"""Stop listening to signal and cleanup discovery data.."""
if not self._removed_from_hass: