support for if/else

This commit is contained in:
ari committed 2022-07-15 23:41:14 -04:00
1 parent a1ca9d62b7
commit bbb87ebf9e
12 files changed
+93 -11

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { AutomationNodeSubtype } from "types/automations";
const subtypeDescMap: Partial<Record<AutomationNodeSubtype, string>> = {
choose: "create conditional if/else statements",
parallel: "run multiple nodes at the same time",
stop: "stop the automation with a status code",
wait: "wait based on a condition",
repeat: "repeat a sequence until or while some conditions are met",
device: "device related actions",
service: "call a service",
};
export const getNodeSubTypeDescription = (
nst: AutomationNodeSubtype
): string => {
return subtypeDescMap[nst] ?? "";
};