target device & action device v2
This commit is contained in:
1 parent
04f3e6194f
commit
a32e365d86
9 files changed
+173
-92
No files matched your search
@@ -131,9 +131,19 @@ export const getDescriptionFromAutomationNode = <N extends AutomationNodeTypes>(
|
||||
return `Trigger ${node.event}`;
|
||||
}
|
||||
if ("device_id" in node) {
|
||||
return `${node.type ?? ""} on ${
|
||||
node.device_id ? namer.getDeviceName(node.device_id) : ""
|
||||
}`;
|
||||
let out = "";
|
||||
if (node.type) {
|
||||
out += `${prettyName(node.type ?? "")} `;
|
||||
}
|
||||
if (node.subtype) {
|
||||
out += node.subtype + " ";
|
||||
}
|
||||
if (node.entity_id) {
|
||||
out += namer.getEntityName(node.entity_id);
|
||||
} else if (node.device_id) {
|
||||
out += namer.getDeviceName(node.device_id);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
if ("choose" in node) {
|
||||
return "Choose";
|
||||
|
||||
Reference in new issue
Block a user