Fix Wifi power_save_mode option (#178)

* Fix WIFI power_save_mode option

* Add Test
This commit is contained in:
Otto Winter 2018-10-13 21:17:19 +02:00 committed by GitHub
parent 4a2cdbf31c
commit 6a24145be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -135,7 +135,7 @@ def to_code(config):
add(wifi.set_reboot_timeout(config[CONF_REBOOT_TIMEOUT]))
if CONF_POWER_SAVE_MODE in config:
add(wifi.set_power_save_mode(WIFI_POWER_SAVE_MODES[CONF_POWER_SAVE_MODE]))
add(wifi.set_power_save_mode(WIFI_POWER_SAVE_MODES[config[CONF_POWER_SAVE_MODE]]))
def lib_deps(config):

View file

@ -35,6 +35,7 @@ wifi:
hostname: myverylonghostname
domain: .local
reboot_timeout: 120s
power_save_mode: none
mqtt:
broker: '192.168.178.84'