From 2b7e1a2cc90e7cc9787ed4734c18c9e01a5ad9a1 Mon Sep 17 00:00:00 2001 From: gwendalg Date: Tue, 26 Apr 2016 03:17:56 -0700 Subject: [PATCH] mqtt: Fix logic when embedded and broker configs are present. (#1919) Fix test to prevent early exit of mqtt init handler when both embedded and broker configs are present. Signed-off-by: Gwendal Grignou --- homeassistant/components/mqtt/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index d0843ebdcef..52ed7d93847 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -195,8 +195,7 @@ def setup(hass, config): # Only auto config if no server config was passed in if broker_config and CONF_EMBEDDED not in conf: broker, port, username, password, certificate, protocol = broker_config - elif not broker_config and (CONF_EMBEDDED in conf or - CONF_BROKER not in conf): + elif not broker_config and CONF_BROKER not in conf: _LOGGER.error('Unable to start broker and auto-configure MQTT.') return False