fix yaml exclusion

This commit is contained in:
Andrey
2021-01-25 17:46:26 +03:00
parent c4205c7ddc
commit e51b50797c

View File

@@ -60,7 +60,7 @@ class MegaD:
):
"""Initialize."""
if mqtt_inputs is None or mqtt_inputs == 'None' or mqtt_inputs is False:
self.http = hass.data[DOMAIN][CONF_HTTP]
self.http = hass.data.get(DOMAIN, {}).get(CONF_HTTP)
self.http.allowed_hosts |= {host}
else:
self.http = None