Migrate template to register reload service on async_setup (#48273)
This commit is contained in:
parent
b58dd7d047
commit
3dec394cad
14 changed files with 132 additions and 174 deletions
|
@ -13,10 +13,9 @@ from homeassistant.const import (
|
|||
from homeassistant.core import callback
|
||||
from homeassistant.exceptions import TemplateError
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.reload import async_setup_reload_service
|
||||
from homeassistant.helpers.script import Script
|
||||
|
||||
from .const import CONF_AVAILABILITY_TEMPLATE, DOMAIN, PLATFORMS
|
||||
from .const import CONF_AVAILABILITY_TEMPLATE
|
||||
from .template_entity import TemplateEntity
|
||||
|
||||
CONF_LOCK = "lock"
|
||||
|
@ -60,7 +59,6 @@ async def _async_create_entities(hass, config):
|
|||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the template lock."""
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
async_add_entities(await _async_create_entities(hass, config))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue