Restrict HA entity list to sensor. domain only
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ class HomeAssistantClient:
|
||||
result = []
|
||||
for s in resp.json():
|
||||
eid = s.get("entity_id", "")
|
||||
if eid.startswith("binary_sensor."):
|
||||
if not eid.startswith("sensor."):
|
||||
continue
|
||||
attrs = s.get("attributes", {})
|
||||
if (attrs.get("device_class") == "battery"
|
||||
|
||||
Reference in New Issue
Block a user