mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Adjust check for orphaned Hue device entries for grouped lights (#69110)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
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…
x
Reference in New Issue
Block a user