mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
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>
This commit is contained in:
parent
6717215438
commit
2b7e1a2cc9
@ -195,8 +195,7 @@ def setup(hass, config):
|
|||||||
# Only auto config if no server config was passed in
|
# Only auto config if no server config was passed in
|
||||||
if broker_config and CONF_EMBEDDED not in conf:
|
if broker_config and CONF_EMBEDDED not in conf:
|
||||||
broker, port, username, password, certificate, protocol = broker_config
|
broker, port, username, password, certificate, protocol = broker_config
|
||||||
elif not broker_config and (CONF_EMBEDDED in conf or
|
elif not broker_config and CONF_BROKER not in conf:
|
||||||
CONF_BROKER not in conf):
|
|
||||||
_LOGGER.error('Unable to start broker and auto-configure MQTT.')
|
_LOGGER.error('Unable to start broker and auto-configure MQTT.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user