harden delivery pipeline and production runtime
This commit is contained in:
@@ -15,9 +15,10 @@ class HaReader:
|
||||
entities = self._client.list_entities()
|
||||
summaries: list[HaEntitySummary] = []
|
||||
for item in entities:
|
||||
entity_id = item.get("entity_id", "")
|
||||
if "." not in entity_id:
|
||||
raw_entity_id = item.get("entity_id")
|
||||
if not isinstance(raw_entity_id, str) or "." not in raw_entity_id:
|
||||
continue
|
||||
entity_id = raw_entity_id
|
||||
domain = entity_id.split(".", 1)[0]
|
||||
raw_attributes = item.get("attributes") or {}
|
||||
attributes: dict[str, Any] = raw_attributes if isinstance(raw_attributes, dict) else {}
|
||||
|
||||
Reference in New Issue
Block a user