Add support for multiple event triggers in automation (#43097)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
673ac21de4
commit
6f326a7ea4
7 changed files with 131 additions and 64 deletions
15
homeassistant/components/automation/helpers.py
Normal file
15
homeassistant/components/automation/helpers.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Helpers for automation integration."""
|
||||
from homeassistant.components import blueprint
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.singleton import singleton
|
||||
|
||||
from .const import DOMAIN, LOGGER
|
||||
|
||||
DATA_BLUEPRINTS = "automation_blueprints"
|
||||
|
||||
|
||||
@singleton(DATA_BLUEPRINTS)
|
||||
@callback
|
||||
def async_get_blueprints(hass: HomeAssistant) -> blueprint.DomainBlueprints: # type: ignore
|
||||
"""Get automation blueprints."""
|
||||
return blueprint.DomainBlueprints(hass, DOMAIN, LOGGER) # type: ignore
|
Loading…
Add table
Add a link
Reference in a new issue