Exclude binary_sensor entities from HA battery entity list

This commit is contained in:
2026-04-14 01:59:26 -05:00
parent d00695cd51
commit 24feeb4fe4
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -54,6 +54,8 @@ class HomeAssistantClient:
result = []
for s in resp.json():
eid = s.get("entity_id", "")
if eid.startswith("binary_sensor."):
continue
attrs = s.get("attributes", {})
if (attrs.get("device_class") == "battery"
or "battery" in eid.lower()):