From dc6bdfc8f4eecf0bf9d2b07f0995048fc9599dab Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 25 Jan 2021 17:56:47 +0300 Subject: [PATCH] fix yaml exclusion --- custom_components/mega/hub.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/mega/hub.py b/custom_components/mega/hub.py index dc93cd7..e6510ee 100644 --- a/custom_components/mega/hub.py +++ b/custom_components/mega/hub.py @@ -61,7 +61,8 @@ class MegaD: """Initialize.""" if mqtt_inputs is None or mqtt_inputs == 'None' or mqtt_inputs is False: self.http = hass.data.get(DOMAIN, {}).get(CONF_HTTP) - self.http.allowed_hosts |= {host} + if not self.http is None: + self.http.allowed_hosts |= {host} else: self.http = None self.update_all = update_all if update_all is not None else True