1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 04:32:23 +01:00
This commit is contained in:
Otto Winter
2018-11-23 23:44:24 +01:00
parent 607eec0abd
commit a6f1e92c20

View File

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