Revert "Fix the updater schema (#47128)" (#47254)

This reverts commit 98be703d90e44efe43b1a17c7e5243e5097b00b1.
This commit is contained in:
Paulus Schoutsen 2021-03-01 16:12:48 -08:00 committed by GitHub
parent 3ee589d973
commit cc6293623f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ UPDATER_URL = "https://updater.home-assistant.io/"
CONFIG_SCHEMA = vol.Schema(
{
vol.Optional(DOMAIN, default={}): {
DOMAIN: {
vol.Optional(CONF_REPORTING, default=True): cv.boolean,
vol.Optional(CONF_COMPONENT_REPORTING, default=False): cv.boolean,
}
@ -56,13 +56,13 @@ async def async_setup(hass, config):
# This component only makes sense in release versions
_LOGGER.info("Running on 'dev', only analytics will be submitted")
conf = config[DOMAIN]
if conf[CONF_REPORTING]:
conf = config.get(DOMAIN, {})
if conf.get(CONF_REPORTING):
huuid = await hass.helpers.instance_id.async_get()
else:
huuid = None
include_components = conf[CONF_COMPONENT_REPORTING]
include_components = conf.get(CONF_COMPONENT_REPORTING)
async def check_new_version() -> Updater:
"""Check if a new version is available and report if one is."""