Remove optional validation when creating conditions (#60481)
This commit is contained in:
parent
76b047dd12
commit
caf5ee2fab
24 changed files with 486 additions and 580 deletions
|
@ -58,12 +58,8 @@ async def async_get_conditions(
|
|||
|
||||
|
||||
@callback
|
||||
def async_condition_from_config(
|
||||
config: ConfigType, config_validation: bool
|
||||
) -> condition.ConditionCheckerType:
|
||||
def async_condition_from_config(config: ConfigType) -> condition.ConditionCheckerType:
|
||||
"""Create a function to test a device condition."""
|
||||
if config_validation:
|
||||
config = CONDITION_SCHEMA(config)
|
||||
if config[CONF_TYPE] == "is_on":
|
||||
state = STATE_ON
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue