Add the ability to reload the rest platforms from yaml (#39257)
* Add the ability to reload rest platforms from yaml * Revert changes to notify as these will be done in another pass
This commit is contained in:
1 parent
758c0adb5e
commit
5018e53b33
7 files changed
+77
-2
No files matched your search
@@ -21,6 +21,9 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.reload import async_setup_reload_service
|
||||
|
||||
from . import DOMAIN, PLATFORMS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -58,6 +61,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the RESTful switch."""
|
||||
|
||||
await async_setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||
|
||||
body_off = config.get(CONF_BODY_OFF)
|
||||
body_on = config.get(CONF_BODY_ON)
|
||||
is_on_template = config.get(CONF_IS_ON_TEMPLATE)
|
||||
|
||||
Reference in new issue
Block a user