Skip to content

Commit

Permalink
mqtt: Fix logic when embedded and broker configs are present. (home-a…
Browse files Browse the repository at this point in the history
…ssistant#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>
  • Loading branch information
gwendalg authored and balloob committed Apr 26, 2016
1 parent 6717215 commit 2b7e1a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2b7e1a2

Please sign in to comment.