diff --git a/esphomeyaml/config_validation.py b/esphomeyaml/config_validation.py index 1b92f5f5fb..aa7e68ddd0 100644 --- a/esphomeyaml/config_validation.py +++ b/esphomeyaml/config_validation.py @@ -117,7 +117,7 @@ def ensure_list(*validators): try: ret.append(user(val)) except vol.Invalid as err: - err.prepend(i) + err.prepend([i]) raise err return ret @@ -572,7 +572,7 @@ def mqtt_qos(value): def requires_component(comp): def validator(value): - if comp not in CORE.config: + if comp not in CORE.raw_config: raise vol.Invalid("This option requires component {}".format(comp)) return value return validator diff --git a/tests/test1.yaml b/tests/test1.yaml index cd60299dd7..47ba28bac2 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -22,8 +22,13 @@ esphomeyaml: build_path: build/test1 wifi: - ssid: 'MySSID' - password: 'password1' + networks: + - ssid: 'MySSID' + password: 'password1' + - ssid: 'MySSID2' + password: '' + channel: 14 + bssid: 'A1:63:95:47:D3:1D' manual_ip: static_ip: 192.168.178.230 gateway: 192.168.178.1 @@ -777,6 +782,7 @@ switch: icon: "mdi:restart" inverted: True command_topic: custom_command_topic + restore_mode: ALWAYS_OFF - platform: remote_transmitter name: "Panasonic TV Off" nec: