Add Blueprint foundation to Scripts (#48621)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Franck Nijhof 2021-04-28 00:15:38 +02:00 committed by GitHub
parent cd84595429
commit 89e7983ee0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 448 additions and 103 deletions

View 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)