service autocomplete

This commit is contained in:
ari committed 2022-06-06 22:37:34 -04:00
1 parent 78494ee74d
commit 4c3b34195a
14 files changed
+437 -274

No files matched your search

+2 -1
View File
@@ -5,6 +5,7 @@ import { AutomationTime } from "types/automations/common";
export interface Namer {
getEntityName(entity_id: string | string[], maxEntities?: number): string;
getDeviceName(device_id: string): string;
getServiceName(service: string): string;
}
export const convertTimeToString = (t: AutomationTime) => {
@@ -101,7 +102,7 @@ export const getDescriptionFromAutomationNode = <N extends AutomationNodeTypes>(
}
}
if ('service' in node) {
return node.service
return namer.getServiceName(node.service)
}
if ('repeat' in node) {
return 'Repeat ' + node.repeat.count