Update sub-component batteries from parent HA entity in poller and live sync

This commit is contained in:
2026-06-10 12:28:27 -05:00
parent d41fe7f4ab
commit 2a103f52a5
4 changed files with 43 additions and 13 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ class HaPoller:
for device in devices:
pct = self._client.get_state(device.ha_entity_id)
if pct is not None:
for battery in device.batteries:
if battery.status == "installed" and battery.battery_percentage != pct:
for battery in device.installed_batteries():
if battery.battery_percentage != pct:
battery.battery_percentage = pct
session.add(BatteryPctLog(
battery_id=battery.id,