UniFi - dont schedule updates on disabled entities (#26278)
* Dont schedule updates on disabled entities * Use entity enabled since it is availablepull/26297/head
parent
6a02fd51b8
commit
0d7326168e
|
@ -150,7 +150,9 @@ def update_items(controller, async_add_entities, tracked):
|
|||
|
||||
for client_id in controller.api.clients:
|
||||
|
||||
if client_id in tracked and tracked[client_id].entity_id:
|
||||
if client_id in tracked:
|
||||
if not tracked[client_id].enabled:
|
||||
continue
|
||||
LOGGER.debug(
|
||||
"Updating UniFi tracked client %s (%s)",
|
||||
tracked[client_id].entity_id,
|
||||
|
@ -183,7 +185,9 @@ def update_items(controller, async_add_entities, tracked):
|
|||
|
||||
for device_id in controller.api.devices:
|
||||
|
||||
if device_id in tracked and tracked[device_id].entity_id:
|
||||
if device_id in tracked:
|
||||
if not tracked[device_id].enabled:
|
||||
continue
|
||||
LOGGER.debug(
|
||||
"Updating UniFi tracked device %s (%s)",
|
||||
tracked[device_id].entity_id,
|
||||
|
|
Loading…
Reference in New Issue