CHeck if entity for card has attributes
This commit is contained in:
@ -296,18 +296,18 @@ class HADataProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newGroup["entity_id"] = entityId;
|
if (cardOrEntityData["attributes"] != null) {
|
||||||
newGroup["friendly_name"] =
|
newGroup["entity_id"] = entityId;
|
||||||
(cardOrEntityData['attributes'] != null)
|
newGroup["friendly_name"] = cardOrEntityData['attributes']['friendly_name'] ?? "";
|
||||||
? (cardOrEntityData['attributes']['friendly_name'] ??
|
newGroup["children"] = List<String>();
|
||||||
"")
|
cardOrEntityData["attributes"]["entity_id"].forEach((
|
||||||
: "";
|
groupedEntityId) {
|
||||||
newGroup["children"] = List<String>();
|
newGroup["children"].add(groupedEntityId);
|
||||||
cardOrEntityData["attributes"]["entity_id"].forEach((
|
});
|
||||||
groupedEntityId) {
|
viewStructure["groups"]["$entityId"] = Map.from(newGroup);
|
||||||
newGroup["children"].add(groupedEntityId);
|
} else {
|
||||||
});
|
TheLogger.log("Warning", "Group has no attributes to build a card: $entityId");
|
||||||
viewStructure["groups"]["$entityId"] = Map.from(newGroup);
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TheLogger.log("Warning", "Unknown entity inside view: $entityId");
|
TheLogger.log("Warning", "Unknown entity inside view: $entityId");
|
||||||
|
Reference in New Issue
Block a user