1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

Support shorthand logical operators in script sequences (#71022)

This commit is contained in:
Franck Nijhof
2022-04-29 18:06:21 +02:00
committed by GitHub
parent 76d105d0ba
commit 682ac52a20
2 changed files with 118 additions and 1 deletions

View File

@@ -1599,7 +1599,7 @@ def determine_script_action(action: dict[str, Any]) -> str:
if CONF_WAIT_TEMPLATE in action:
return SCRIPT_ACTION_WAIT_TEMPLATE
if CONF_CONDITION in action:
if any(key in action for key in (CONF_CONDITION, "and", "or", "not")):
return SCRIPT_ACTION_CHECK_CONDITION
if CONF_EVENT in action: