mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
UniFi - dont schedule updates on disabled entities (#26278)
* Dont schedule updates on disabled entities * Use entity enabled since it is available
This commit is contained in:
parent
6a02fd51b8
commit
0d7326168e
@ -150,7 +150,9 @@ def update_items(controller, async_add_entities, tracked):
|
|||||||
|
|
||||||
for client_id in controller.api.clients:
|
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(
|
LOGGER.debug(
|
||||||
"Updating UniFi tracked client %s (%s)",
|
"Updating UniFi tracked client %s (%s)",
|
||||||
tracked[client_id].entity_id,
|
tracked[client_id].entity_id,
|
||||||
@ -183,7 +185,9 @@ def update_items(controller, async_add_entities, tracked):
|
|||||||
|
|
||||||
for device_id in controller.api.devices:
|
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(
|
LOGGER.debug(
|
||||||
"Updating UniFi tracked device %s (%s)",
|
"Updating UniFi tracked device %s (%s)",
|
||||||
tracked[device_id].entity_id,
|
tracked[device_id].entity_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user