UniFi Protect cleanup and enable unadopted devices (#73860)
This commit is contained in:
parent
5c5fd746fd
commit
01a9367281
24 changed files with 258 additions and 114 deletions
|
@ -27,12 +27,12 @@ async def async_setup_entry(
|
|||
data: ProtectData = hass.data[DOMAIN][entry.entry_id]
|
||||
entities = []
|
||||
for device in data.api.bootstrap.lights.values():
|
||||
if not device.is_adopted_by_us:
|
||||
continue
|
||||
|
||||
if device.can_write(data.api.bootstrap.auth_user):
|
||||
entities.append(ProtectLight(data, device))
|
||||
|
||||
if not entities:
|
||||
return
|
||||
|
||||
async_add_entities(entities)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue