Reduce HA live fetch timeout to 1s

This commit is contained in:
2026-04-14 16:25:11 -05:00
parent 0d79972dae
commit 8fb03e1fa3
+1 -1
View File
@@ -665,7 +665,7 @@ def create_app(config_object="config"):
device_types = sorted({d.device_type for d in db.query(Device).all() if d.device_type}) device_types = sorted({d.device_type for d in db.query(Device).all() if d.device_type})
ha_live_pct = None ha_live_pct = None
if ha_client.enabled and device.ha_entity_id: if ha_client.enabled and device.ha_entity_id:
ha_live_pct = ha_client.get_state(device.ha_entity_id, timeout=4) ha_live_pct = ha_client.get_state(device.ha_entity_id, timeout=1)
if ha_live_pct is not None: if ha_live_pct is not None:
changed = False changed = False
for battery in device.batteries: for battery in device.batteries: