fixed state

This commit is contained in:
ari committed 2022-07-19 21:13:19 -04:00
1 parent 649ee0f31e
commit fd35938fcb
3 files changed
+22 -4

No files matched your search

+5 -1
View File
@@ -209,10 +209,14 @@ export const useHA = () => {
},
getEntityName(entity_id, maxEntities = 1) {
if (Array.isArray(entity_id)) {
return entity_id
const out = entity_id
.slice(0, maxEntities)
.map(entities.getLabel)
.join(", ");
if (entity_id.length > maxEntities) {
return out + " and more";
}
return out;
}
return entities.getLabel(entity_id);
},