Update for templating support

This commit is contained in:
Fabian Affolter 2015-12-15 08:22:54 +01:00
parent 159bc21e6b
commit a83768bb7a
4 changed files with 8 additions and 13 deletions

View file

@ -25,6 +25,7 @@ binary_sensor:
qos: 0
payload_on: "ON"
payload_of: "OFF"
value_template: '{% raw %}{{ template }}{% endraw %}'
```
Configuration variables:
@ -34,7 +35,7 @@ Configuration variables:
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0.
- **payload_on** (*Optional*): The payload that represents on state. Default is "ON".
- **payload_off** (*Optional*): The payload that represents state. Default is "OFF".
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually: