better name for device trigger

This commit is contained in:
ari committed 2022-06-17 22:22:37 -04:00
1 parent 537bfe824b
commit 4bada614b9
2 files changed
+16 -14

No files matched your search

+1 -14
View File
@@ -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;
}