Prefer YAML config mode in Lovelace system_health (#59835)
parent
b6dea3c6cb
commit
edbe54c346
|
@ -140,6 +140,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
|
||||
hass.data[DOMAIN] = {
|
||||
# We store a dictionary mapping url_path: config. None is the default.
|
||||
"mode": mode,
|
||||
"dashboards": {None: default_config},
|
||||
"resources": resource_collection,
|
||||
"yaml_dashboards": config[DOMAIN].get(CONF_DASHBOARDS, {}),
|
||||
|
|
|
@ -38,7 +38,9 @@ async def system_health_info(hass):
|
|||
else:
|
||||
health_info[key] = dashboard[key]
|
||||
|
||||
if MODE_STORAGE in modes:
|
||||
if hass.data[DOMAIN][CONF_MODE] == MODE_YAML:
|
||||
health_info[CONF_MODE] = MODE_YAML
|
||||
elif MODE_STORAGE in modes:
|
||||
health_info[CONF_MODE] = MODE_STORAGE
|
||||
elif MODE_YAML in modes:
|
||||
health_info[CONF_MODE] = MODE_YAML
|
||||
|
|
Loading…
Reference in New Issue