Migrate template to register reload service on async_setup (#48273)

This commit is contained in:
Paulus Schoutsen 2021-03-23 20:35:15 -07:00 committed by GitHub
parent b58dd7d047
commit 3dec394cad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 132 additions and 174 deletions

View file

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