Add Blueprint foundation to Scripts (#48621)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
cd84595429
commit
89e7983ee0
17 changed files with 448 additions and 103 deletions
15
homeassistant/components/script/helpers.py
Normal file
15
homeassistant/components/script/helpers.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Helpers for automation integration."""
|
||||
from homeassistant.components.blueprint import DomainBlueprints
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.singleton import singleton
|
||||
|
||||
from .const import DOMAIN, LOGGER
|
||||
|
||||
DATA_BLUEPRINTS = "script_blueprints"
|
||||
|
||||
|
||||
@singleton(DATA_BLUEPRINTS)
|
||||
@callback
|
||||
def async_get_blueprints(hass: HomeAssistant) -> DomainBlueprints:
|
||||
"""Get script blueprints."""
|
||||
return DomainBlueprints(hass, DOMAIN, LOGGER)
|
Loading…
Add table
Add a link
Reference in a new issue