mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Fix the updater schema (#47128)
This commit is contained in:
parent
f4189510e9
commit
98be703d90
@ -27,7 +27,7 @@ UPDATER_URL = "https://updater.home-assistant.io/"
|
|||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema(
|
CONFIG_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
DOMAIN: {
|
vol.Optional(DOMAIN, default={}): {
|
||||||
vol.Optional(CONF_REPORTING, default=True): cv.boolean,
|
vol.Optional(CONF_REPORTING, default=True): cv.boolean,
|
||||||
vol.Optional(CONF_COMPONENT_REPORTING, default=False): 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
|
# This component only makes sense in release versions
|
||||||
_LOGGER.info("Running on 'dev', only analytics will be submitted")
|
_LOGGER.info("Running on 'dev', only analytics will be submitted")
|
||||||
|
|
||||||
conf = config.get(DOMAIN, {})
|
conf = config[DOMAIN]
|
||||||
if conf.get(CONF_REPORTING):
|
if conf[CONF_REPORTING]:
|
||||||
huuid = await hass.helpers.instance_id.async_get()
|
huuid = await hass.helpers.instance_id.async_get()
|
||||||
else:
|
else:
|
||||||
huuid = None
|
huuid = None
|
||||||
|
|
||||||
include_components = conf.get(CONF_COMPONENT_REPORTING)
|
include_components = conf[CONF_COMPONENT_REPORTING]
|
||||||
|
|
||||||
async def check_new_version() -> Updater:
|
async def check_new_version() -> Updater:
|
||||||
"""Check if a new version is available and report if one is."""
|
"""Check if a new version is available and report if one is."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user