From 98be703d90e44efe43b1a17c7e5243e5097b00b1 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 28 Feb 2021 05:41:06 -0800 Subject: [PATCH] Fix the updater schema (#47128) --- homeassistant/components/updater/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/updater/__init__.py b/homeassistant/components/updater/__init__.py index 9d65bb4c5d4..81910db38d6 100644 --- a/homeassistant/components/updater/__init__.py +++ b/homeassistant/components/updater/__init__.py @@ -27,7 +27,7 @@ UPDATER_URL = "https://updater.home-assistant.io/" CONFIG_SCHEMA = vol.Schema( { - DOMAIN: { + vol.Optional(DOMAIN, default={}): { 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.get(DOMAIN, {}) - if conf.get(CONF_REPORTING): + conf = config[DOMAIN] + if conf[CONF_REPORTING]: huuid = await hass.helpers.instance_id.async_get() else: huuid = None - include_components = conf.get(CONF_COMPONENT_REPORTING) + include_components = conf[CONF_COMPONENT_REPORTING] async def check_new_version() -> Updater: """Check if a new version is available and report if one is."""