mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Improve validation of device condition config (#27131)
* Improve validation of device condition config * Fix typing
This commit is contained in:
committed by
Paulus Schoutsen
parent
363873dfcb
commit
c43eeee62f
@@ -96,7 +96,12 @@ async def async_validate_action_config(
|
||||
platform = await device_automation.async_get_device_automation_platform(
|
||||
hass, config[CONF_DOMAIN], "action"
|
||||
)
|
||||
config = platform.ACTION_SCHEMA(config)
|
||||
config = platform.ACTION_SCHEMA(config) # type: ignore
|
||||
if action_type == ACTION_CHECK_CONDITION and config[CONF_CONDITION] == "device":
|
||||
platform = await device_automation.async_get_device_automation_platform(
|
||||
hass, config[CONF_DOMAIN], "condition"
|
||||
)
|
||||
config = platform.CONDITION_SCHEMA(config) # type: ignore
|
||||
|
||||
return config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user