Custom Binary Sensor: Add missing ";" and fix indentation in YAML (#164)

Example would not compile while the semicolon ";" was missing.
This commit is contained in:
mjoshd 2019-02-18 12:49:26 -05:00 committed by Otto Winter
parent 26be1d3c22
commit 7c03e1ff8f

View File

@ -29,7 +29,7 @@ same as the gpio binary sensor.
// This will be called every "update_interval" milliseconds.
// Publish an OFF state
bool state = digitalRead(5)
bool state = digitalRead(5);
publish_state(state);
}
};
@ -46,14 +46,14 @@ And in YAML:
- my_binary_sensor.h
binary_sensor:
- platform: custom
lambda: |-
auto my_custom_sensor = new MyCustomBinarySensor();
App.register_component(my_custom_sensor);
return {my_custom_sensor};
- platform: custom
lambda: |-
auto my_custom_sensor = new MyCustomBinarySensor();
App.register_component(my_custom_sensor);
return {my_custom_sensor};
binary_sensors:
name: "My Custom Binary Sensor"
binary_sensors:
name: "My Custom Binary Sensor"
Configuration variables: