Skip to content

Commit cb0cd1b

Browse files
committed
Allow unregister_node() to fail when removing a device
the device might only exist in HA
1 parent 4d91a9f commit cb0cd1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/plugwise_usb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ async def async_remove_config_entry_device(
190190
try:
191191
await api_stick.unregister_node(mac)
192192
except NodeError:
193-
_LOGGER.error("Plugwise device %s removal failed with NodeError", mac)
194-
return False
193+
_LOGGER.warning("Plugwise node %s unregistering failed with NodeError", mac)
194+
return True # Must return True for device_registry removal to happen!
195195

196196
_LOGGER.debug("Plugwise device %s successfully removed", mac)
197197
return True

0 commit comments

Comments
 (0)