mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Support shorthand logical operators in script sequences (#12509)
This commit is contained in:
parent
671c8e387f
commit
3438912ba5
@ -294,7 +294,7 @@ export const getActionType = (action: Action): ActionType => {
|
||||
if ("wait_template" in action) {
|
||||
return "wait_template";
|
||||
}
|
||||
if ("condition" in action) {
|
||||
if (["condition", "and", "or", "not"].some((key) => key in action)) {
|
||||
return "check_condition";
|
||||
}
|
||||
if ("event" in action) {
|
||||
|
@ -65,6 +65,9 @@ const getType = (action: Action | undefined) => {
|
||||
if ("service" in action || "scene" in action) {
|
||||
return getActionType(action);
|
||||
}
|
||||
if (["and", "or", "not"].some((key) => key in action)) {
|
||||
return "condition";
|
||||
}
|
||||
return OPTIONS.find((option) => option in action);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user