Enable auth by default 🙈 (#16107)

* Enable auth by default

* Only default legacy_api_password if api_password set

* Tweak bool check

* typing
This commit is contained in:
Paulus Schoutsen
2018-08-23 13:38:08 +02:00
committed by GitHub
parent 249981de96
commit d21d7cef4c
3 changed files with 56 additions and 3 deletions

View File

@@ -87,9 +87,11 @@ async def async_from_config_dict(config: Dict[str, Any],
log_no_color)
core_config = config.get(core.DOMAIN, {})
has_api_password = bool((config.get('http') or {}).get('api_password'))
try:
await conf_util.async_process_ha_core_config(hass, core_config)
await conf_util.async_process_ha_core_config(
hass, core_config, has_api_password)
except vol.Invalid as ex:
conf_util.async_log_exception(ex, 'homeassistant', core_config, hass)
return None