mirror of
https://github.com/esphome/esphome.git
synced 2024-11-29 02:04:13 +01:00
Add tests, Fix stuff
This commit is contained in:
parent
9bce35e335
commit
92439abeb4
2 changed files with 10 additions and 4 deletions
|
@ -117,7 +117,7 @@ def ensure_list(*validators):
|
||||||
try:
|
try:
|
||||||
ret.append(user(val))
|
ret.append(user(val))
|
||||||
except vol.Invalid as err:
|
except vol.Invalid as err:
|
||||||
err.prepend(i)
|
err.prepend([i])
|
||||||
raise err
|
raise err
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ def mqtt_qos(value):
|
||||||
|
|
||||||
def requires_component(comp):
|
def requires_component(comp):
|
||||||
def validator(value):
|
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))
|
raise vol.Invalid("This option requires component {}".format(comp))
|
||||||
return value
|
return value
|
||||||
return validator
|
return validator
|
||||||
|
|
|
@ -22,8 +22,13 @@ esphomeyaml:
|
||||||
build_path: build/test1
|
build_path: build/test1
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
ssid: 'MySSID'
|
networks:
|
||||||
|
- ssid: 'MySSID'
|
||||||
password: 'password1'
|
password: 'password1'
|
||||||
|
- ssid: 'MySSID2'
|
||||||
|
password: ''
|
||||||
|
channel: 14
|
||||||
|
bssid: 'A1:63:95:47:D3:1D'
|
||||||
manual_ip:
|
manual_ip:
|
||||||
static_ip: 192.168.178.230
|
static_ip: 192.168.178.230
|
||||||
gateway: 192.168.178.1
|
gateway: 192.168.178.1
|
||||||
|
@ -777,6 +782,7 @@ switch:
|
||||||
icon: "mdi:restart"
|
icon: "mdi:restart"
|
||||||
inverted: True
|
inverted: True
|
||||||
command_topic: custom_command_topic
|
command_topic: custom_command_topic
|
||||||
|
restore_mode: ALWAYS_OFF
|
||||||
- platform: remote_transmitter
|
- platform: remote_transmitter
|
||||||
name: "Panasonic TV Off"
|
name: "Panasonic TV Off"
|
||||||
nec:
|
nec:
|
||||||
|
|
Loading…
Reference in a new issue