mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Add support for multiple event triggers in automation (#43097)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user