Core: OZW: Removing a node does not remove the device from the integration

Created on 4 Jul 2020  路  6Comments  路  Source: home-assistant/core

The problem


Nodes removed from the z-wave network leave orphaned devices in the integration. The nodes are completely gone from from the MQTT broker, but the device is still listed in HA under devices as belonging to the OpenZWave integration. There appears to be no way to remove a device.

Environment

  • Home Assistant Core release with the issue: 0.112 (but also 0.111)
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (OS/Container/Supervised/Core): Container
  • Integration causing this issue: ozw
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/ozw/

Problem-relevant configuration.yaml


N/A

Traceback/Error logs


N/A

Additional information

ozw

Most helpful comment

Confirmed, this is indeed because you removed the nodes with the "removefailednode" command. There is no "mailbox" function or whatsoever to detect node removals so we're actually watching the removenode command before we actually remove a device with entities from the integration. I'll push a PR to fix this behaviour.

All 6 comments

Hey there @cgarwood, @marcelveldt, @martinhjelmare, mind taking a look at this issue as its been labeled with an integration (ozw) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

How was the node removed from the network? Did you exclude the node by calling the ozw.remove_node service and performing the device specific maneuver?

I actually removed two nodes, but I did them both via MQTT with removefailednode - was chatting with @firstof9 and this is likely the issue. Maybe should update the title to "removefailednode does not remove device entry from HA"?

I'm thinking this line in __init__.py isn't detecting the removefailednode event perhaps?

I'm thinking this line in __init__.py isn't detecting the removefailednode event perhaps?

Correct, that can be expanded with removefailednode

Confirmed, this is indeed because you removed the nodes with the "removefailednode" command. There is no "mailbox" function or whatsoever to detect node removals so we're actually watching the removenode command before we actually remove a device with entities from the integration. I'll push a PR to fix this behaviour.

Was this page helpful?
0 / 5 - 0 ratings