Skip to content

Commit

Permalink
Temporary fix for the client_id generation (fixes #8315) (#8336)
Browse files Browse the repository at this point in the history
* Temporary fix for the client_id generation (fixes #8315)

* Fix comment

* Move client id setting.

* Lint
  • Loading branch information
fabaff authored and balloob committed Jul 5, 2017
1 parent ea5bec3 commit 0ecceb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ def async_setup(hass, config):
client_cert = conf.get(CONF_CLIENT_CERT)
tls_insecure = conf.get(CONF_TLS_INSECURE)
protocol = conf[CONF_PROTOCOL]

# hbmqtt requires a client id to be set.
if client_id is None:
client_id = 'home-assistant'
elif broker_config:
# If no broker passed in, auto config to internal server
broker, port, username, password, certificate, protocol = broker_config
Expand Down

0 comments on commit 0ecceb6

Please sign in to comment.