mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Automation trigger info type hint improvements (#55402)
* Make automation trigger info a TypedDict * zwave_js trigger type hint fixes * Remove redundant automation trigger info field presence checks * Use async_initialize_triggers in mqtt and tasmota device_trigger tests
This commit is contained in:
@@ -5,7 +5,10 @@ from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.automation import AutomationActionType
|
||||
from homeassistant.components.automation import (
|
||||
AutomationActionType,
|
||||
AutomationTriggerInfo,
|
||||
)
|
||||
from homeassistant.components.device_automation.const import (
|
||||
CONF_IS_OFF,
|
||||
CONF_IS_ON,
|
||||
@@ -146,7 +149,7 @@ async def async_attach_trigger(
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
action: AutomationActionType,
|
||||
automation_info: dict,
|
||||
automation_info: AutomationTriggerInfo,
|
||||
) -> CALLBACK_TYPE:
|
||||
"""Listen for state changes based on configuration."""
|
||||
trigger_type = config[CONF_TYPE]
|
||||
|
||||
Reference in New Issue
Block a user