service autocomplete
This commit is contained in:
1 parent
78494ee74d
commit
4c3b34195a
14 files changed
+437
-274
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user