better name for device trigger
This commit is contained in:
1 parent
537bfe824b
commit
4bada614b9
2 files changed
+16
-14
No files matched your search
@@ -61,20 +61,7 @@ export const getDescriptionFromAutomationNode = <N extends AutomationNodeTypes>(
|
||||
return out;
|
||||
}
|
||||
if (node.platform === "device") {
|
||||
let out = "";
|
||||
if (node.device_id) {
|
||||
out = namer.getDeviceName(node.device_id);
|
||||
}
|
||||
if (!out && node.entity_id) {
|
||||
out = namer.getEntityName(node.entity_id);
|
||||
}
|
||||
if (node.type) {
|
||||
out += node.type;
|
||||
}
|
||||
if (!out) {
|
||||
out = node.platform;
|
||||
}
|
||||
return out;
|
||||
return getDescriptionForDeviceType(node, namer, true);
|
||||
}
|
||||
return node.platform;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user