Fix discovery

This commit is contained in:
Tobias Haase
2019-08-02 00:09:08 +02:00
parent 940f3f8853
commit 04883d9d95

View File

@@ -86,6 +86,10 @@ async def async_setup(hass, config):
# This component only makes sense in release versions
_LOGGER.info("Running on 'dev', only analytics will be submitted")
hass.async_create_task(
discovery.async_load_platform(hass, "binary_sensor", DOMAIN, {}, config)
)
config = config.get(DOMAIN, {})
if config.get(CONF_REPORTING):
huuid = await hass.async_add_job(_load_uuid, hass)
@@ -94,10 +98,6 @@ async def async_setup(hass, config):
include_components = config.get(CONF_COMPONENT_REPORTING)
hass.async_create_task(
discovery.async_load_platform(hass, "binary_sensor", DOMAIN, {}, config)
)
async def check_new_version(now):
"""Check if a new version is available and report if one is."""
result = await get_newest_version(hass, huuid, include_components)