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:
J. Nick Koston 2020-08-25 19:05:29 -05:00 committed by GitHub
parent 758c0adb5e
commit 5018e53b33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 2 deletions

View file

@ -29,7 +29,9 @@ from homeassistant.const import (
)
from homeassistant.exceptions import PlatformNotReady
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.reload import setup_reload_service
from . import DOMAIN, PLATFORMS
from .sensor import RestData
_LOGGER = logging.getLogger(__name__)
@ -68,6 +70,9 @@ PLATFORM_SCHEMA = vol.All(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the REST binary sensor."""
setup_reload_service(hass, DOMAIN, PLATFORMS)
name = config.get(CONF_NAME)
resource = config.get(CONF_RESOURCE)
resource_template = config.get(CONF_RESOURCE_TEMPLATE)