Exclude binary_sensor entities from HA battery entity list
This commit is contained in:
@@ -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()):
|
||||
|
||||
Reference in New Issue
Block a user