mirror of
https://github.com/home-assistant/core.git
synced 2025-09-07 05:41:32 +02:00
Update trigger method names
This commit is contained in:
@@ -59,17 +59,15 @@ class StateTrigger(Trigger):
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
@classmethod
|
@classmethod
|
||||||
async def async_validate_trigger_config(
|
async def async_validate_config(
|
||||||
cls, hass: HomeAssistant, config: ConfigType
|
cls, hass: HomeAssistant, config: ConfigType
|
||||||
) -> ConfigType:
|
) -> ConfigType:
|
||||||
"""Validate config."""
|
"""Validate config."""
|
||||||
return cast(ConfigType, STATE_TRIGGER_SCHEMA(config))
|
return cast(ConfigType, STATE_TRIGGER_SCHEMA(config))
|
||||||
|
|
||||||
@override
|
@override
|
||||||
async def async_attach_trigger(
|
async def async_attach(
|
||||||
self,
|
self, action: TriggerActionType, trigger_info: TriggerInfo
|
||||||
action: TriggerActionType,
|
|
||||||
trigger_info: TriggerInfo,
|
|
||||||
) -> CALLBACK_TYPE:
|
) -> CALLBACK_TYPE:
|
||||||
"""Attach the trigger."""
|
"""Attach the trigger."""
|
||||||
job = HassJob(action, f"light state trigger {trigger_info}")
|
job = HassJob(action, f"light state trigger {trigger_info}")
|
||||||
|
Reference in New Issue
Block a user