Adjust check for orphaned Hue device entries for grouped lights (#69110)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>pull/69116/head
parent
5f897874cb
commit
538c8160f3
|
@ -81,6 +81,10 @@ async def async_setup_devices(bridge: "HueBridge"):
|
|||
dev_reg, entry.entry_id
|
||||
):
|
||||
if device not in known_devices:
|
||||
# handle case where a virtual device was created for a Hue group
|
||||
hue_dev_id = next(x[1] for x in device.identifiers if x[0] == DOMAIN)
|
||||
if hue_dev_id in api.groups:
|
||||
continue
|
||||
dev_reg.async_remove_device(device.id)
|
||||
|
||||
# add listener for updates on Hue devices controller
|
||||
|
|
Loading…
Reference in New Issue