Fix callback and async (#31281)
* Fix callback and async * Fix a return * Fix test * Fix mqtt tests * Fix some more callbacks
This commit is contained in:
parent
ee602e40a6
commit
e9e44dbd97
90 changed files with 627 additions and 883 deletions
|
@ -24,7 +24,7 @@ from homeassistant.const import (
|
|||
CONF_PLATFORM,
|
||||
CONF_TYPE,
|
||||
)
|
||||
from homeassistant.core import CALLBACK_TYPE, Context, HomeAssistant
|
||||
from homeassistant.core import CALLBACK_TYPE, Context, HomeAssistant, callback
|
||||
from homeassistant.helpers import condition, config_validation as cv
|
||||
from homeassistant.helpers.entity_registry import async_entries_for_device
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
|
@ -121,6 +121,7 @@ async def async_call_action_from_config(
|
|||
)
|
||||
|
||||
|
||||
@callback
|
||||
def async_condition_from_config(config: ConfigType) -> condition.ConditionCheckerType:
|
||||
"""Evaluate state based on configuration."""
|
||||
condition_type = config[CONF_TYPE]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue