mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 17:27:45 +01:00
Fix remote_receiver binary_sensor schema (#578)
Fixes https://github.com/esphome/issues/issues/353#issuecomment-497491863
This commit is contained in:
parent
5ab995d8ca
commit
605e365405
3 changed files with 4 additions and 2 deletions
|
@ -155,6 +155,6 @@ def light_addressable_set_to_code(config, action_id, template_arg, args):
|
||||||
automation.maybe_simple_id({
|
automation.maybe_simple_id({
|
||||||
cv.Required(CONF_ID): cv.use_id(LightState),
|
cv.Required(CONF_ID): cv.use_id(LightState),
|
||||||
}))
|
}))
|
||||||
def binary_sensor_is_on_to_code(config, condition_id, template_arg, args):
|
def light_is_on_off_to_code(config, condition_id, template_arg, args):
|
||||||
paren = yield cg.get_variable(config[CONF_ID])
|
paren = yield cg.get_variable(config[CONF_ID])
|
||||||
yield cg.new_Pvariable(condition_id, template_arg, paren)
|
yield cg.new_Pvariable(condition_id, template_arg, paren)
|
||||||
|
|
|
@ -1175,7 +1175,6 @@ def validate_registry_entry(name, registry):
|
||||||
if not isinstance(value, dict):
|
if not isinstance(value, dict):
|
||||||
raise Invalid(u"{} must consist of key-value mapping! Got {}"
|
raise Invalid(u"{} must consist of key-value mapping! Got {}"
|
||||||
u"".format(name.title(), value))
|
u"".format(name.title(), value))
|
||||||
value = base_schema(value)
|
|
||||||
key = next((x for x in value if x not in ignore_keys), None)
|
key = next((x for x in value if x not in ignore_keys), None)
|
||||||
if key is None:
|
if key is None:
|
||||||
raise Invalid(u"Key missing from {}! Got {}".format(name, value))
|
raise Invalid(u"Key missing from {}! Got {}".format(name, value))
|
||||||
|
|
|
@ -105,6 +105,9 @@ mqtt:
|
||||||
- light.control:
|
- light.control:
|
||||||
id: living_room_lights
|
id: living_room_lights
|
||||||
brightness: !lambda 'return id(living_room_lights).current_values.get_brightness() + 0.5;'
|
brightness: !lambda 'return id(living_room_lights).current_values.get_brightness() + 0.5;'
|
||||||
|
- light.dim_relative:
|
||||||
|
id: living_room_lights
|
||||||
|
relative_brightness: 5%
|
||||||
- uart.write:
|
- uart.write:
|
||||||
id: uart0
|
id: uart0
|
||||||
data: Hello World
|
data: Hello World
|
||||||
|
|
Loading…
Reference in a new issue