mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Correct validation of conditions in scripts and automations (#60403)
This commit is contained in:
parent
dc98791963
commit
ad9c3a47cf
@ -262,11 +262,7 @@ async def async_validate_action_config(
|
|||||||
config = platform.ACTION_SCHEMA(config) # type: ignore
|
config = platform.ACTION_SCHEMA(config) # type: ignore
|
||||||
|
|
||||||
elif action_type == cv.SCRIPT_ACTION_CHECK_CONDITION:
|
elif action_type == cv.SCRIPT_ACTION_CHECK_CONDITION:
|
||||||
if config[CONF_CONDITION] == "device":
|
config = await condition.async_validate_condition_config(hass, config) # type: ignore
|
||||||
platform = await device_automation.async_get_device_automation_platform(
|
|
||||||
hass, config[CONF_DOMAIN], "condition"
|
|
||||||
)
|
|
||||||
config = platform.CONDITION_SCHEMA(config) # type: ignore
|
|
||||||
|
|
||||||
elif action_type == cv.SCRIPT_ACTION_WAIT_FOR_TRIGGER:
|
elif action_type == cv.SCRIPT_ACTION_WAIT_FOR_TRIGGER:
|
||||||
config[CONF_WAIT_FOR_TRIGGER] = await async_validate_trigger_config(
|
config[CONF_WAIT_FOR_TRIGGER] = await async_validate_trigger_config(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user