Add the ability to reload light/cover groups from yaml (#39250)

* Add the ability to reload light/cover groups from yaml

Update previous usage to reduce code duplication.

* Fix conflict from rebase
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-25 18:13:43 -05:00
1 parent e109b04efe
commit 810df38f0d
16 files changed
+175 -56

No files matched your search

@@ -24,10 +24,10 @@ from homeassistant.exceptions import TemplateError
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import async_generate_entity_id
from homeassistant.helpers.event import async_call_later
from homeassistant.helpers.reload import async_setup_reload_service
from homeassistant.helpers.template import result_as_boolean
from . import async_setup_reload_service
from .const import CONF_AVAILABILITY_TEMPLATE
from .const import CONF_AVAILABILITY_TEMPLATE, DOMAIN, PLATFORMS
from .template_entity import TemplateEntity
_LOGGER = logging.getLogger(__name__)
@@ -97,7 +97,7 @@ async def _async_create_entities(hass, config):
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the template binary sensors."""
await async_setup_reload_service(hass)
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
async_add_entities(await _async_create_entities(hass, config))