Fix zwave_js device re-interview (#78046)

* Handle stale node and entity info on re-interview

* Add test

* Unsubscribe on config entry unload
This commit is contained in:
Martin Hjelmare 2022-09-08 20:15:27 +02:00 committed by GitHub
parent be064bfeef
commit f11b51e12b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 103 additions and 9 deletions

View file

@ -189,6 +189,14 @@ class ZWaveNodeFirmwareUpdate(UpdateEntity):
)
)
self.async_on_remove(
async_dispatcher_connect(
self.hass,
f"{DOMAIN}_{self._base_unique_id}_remove_entity_on_ready_node",
self.async_remove,
)
)
self.async_on_remove(async_at_start(self.hass, self._async_update))
async def async_will_remove_from_hass(self) -> None: