1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-13 08:28:19 +00:00
This commit is contained in:
Otto Winter 2018-11-23 23:44:24 +01:00
parent 607eec0abd
commit a6f1e92c20
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -53,8 +53,8 @@ def validate_config(value):
if CONF_PORT not in value: if CONF_PORT not in value:
parts = value[CONF_BROKER].split(u':') parts = value[CONF_BROKER].split(u':')
if len(parts) == 2: if len(parts) == 2:
value[CONF_BROKER] = parts[1] value[CONF_BROKER] = parts[0]
value[CONF_PORT] = cv.port(parts[2]) value[CONF_PORT] = cv.port(parts[1])
else: else:
value[CONF_PORT] = 1883 value[CONF_PORT] = 1883
return value return value