mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Fix ozw entities cleanup on node removal (#37630)
* fix hass cleanup on node removal also detect removefailednode command to issue a full cleanup * satisfy pylint
This commit is contained in:
parent
ad025f0b3b
commit
adc88deaa8
@ -101,7 +101,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
_LOGGER.debug("[INSTANCE EVENT]: %s - data: %s", event, event_data)
|
||||
# The actual removal action of a Z-Wave node is reported as instance event
|
||||
# Only when this event is detected we cleanup the device and entities from hass
|
||||
if event == "removenode" and "Node" in event_data:
|
||||
# Note: Find a more elegant way of doing this, e.g. a notification of this event from OZW
|
||||
if event in ["removenode", "removefailednode"] and "Node" in event_data:
|
||||
removed_nodes.append(event_data["Node"])
|
||||
|
||||
@callback
|
||||
|
Loading…
x
Reference in New Issue
Block a user