From e51b50797c8f13b2050aa4ac37611828c2714cf9 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 25 Jan 2021 17:46:26 +0300 Subject: [PATCH] fix yaml exclusion --- custom_components/mega/hub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/mega/hub.py b/custom_components/mega/hub.py index 41833a1..dc93cd7 100644 --- a/custom_components/mega/hub.py +++ b/custom_components/mega/hub.py @@ -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