From 6a24145be6fed6c0b8264780f09918876fa70cd7 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 13 Oct 2018 21:17:19 +0200 Subject: [PATCH] Fix Wifi power_save_mode option (#178) * Fix WIFI power_save_mode option * Add Test --- esphomeyaml/components/wifi.py | 2 +- tests/test1.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/esphomeyaml/components/wifi.py b/esphomeyaml/components/wifi.py index 4a030a6a94..0a95bd6040 100644 --- a/esphomeyaml/components/wifi.py +++ b/esphomeyaml/components/wifi.py @@ -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): diff --git a/tests/test1.yaml b/tests/test1.yaml index 997de4aa48..d6135207cc 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -35,6 +35,7 @@ wifi: hostname: myverylonghostname domain: .local reboot_timeout: 120s + power_save_mode: none mqtt: broker: '192.168.178.84'