fixed state
This commit is contained in:
1 parent
649ee0f31e
commit
fd35938fcb
3 files changed
+22
-4
No files matched your search
@@ -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);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user