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 <gwendal@gmail.com>
pull/1898/merge
gwendalg 2016-04-26 03:17:56 -07:00 committed by Paulus Schoutsen
parent 6717215438
commit 2b7e1a2cc9
1 changed files with 1 additions and 2 deletions

View File

@ -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