Fix OTA port not being set

This commit is contained in:
Otto Winter 2018-06-06 11:12:14 +02:00
parent 1267680379
commit b6e7ad3589
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -29,6 +29,8 @@ def to_code(config):
if CONF_PASSWORD in config: if CONF_PASSWORD in config:
hash_ = hashlib.md5(config[CONF_PASSWORD].encode()).hexdigest() hash_ = hashlib.md5(config[CONF_PASSWORD].encode()).hexdigest()
add(ota.set_auth_password_hash(hash_)) add(ota.set_auth_password_hash(hash_))
if CONF_PORT in config:
add(ota.set_port(config[CONF_PORT]))
if config[CONF_SAFE_MODE]: if config[CONF_SAFE_MODE]:
add(ota.start_safe_mode()) add(ota.start_safe_mode())