mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +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
@@ -232,7 +232,8 @@ def async_condition_from_config(
|
||||
config: ConfigType, config_validation: bool
|
||||
) -> condition.ConditionCheckerType:
|
||||
"""Evaluate state based on configuration."""
|
||||
config = CONDITION_SCHEMA(config)
|
||||
if config_validation:
|
||||
config = CONDITION_SCHEMA(config)
|
||||
condition_type = config[CONF_TYPE]
|
||||
if condition_type in IS_ON:
|
||||
stat = "on"
|
||||
|
||||
Reference in New Issue
Block a user