Add sensor class
This commit is contained in:
parent
875a923b6b
commit
49cc1ebdb3
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ binary_sensor:
|
|||
qos: 0
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
sensor_class: opening
|
||||
value_template: '{% raw %}{{ value.x }}{% endraw %}'
|
||||
```
|
||||
|
||||
|
@ -35,6 +36,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".
|
||||
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
|
||||
- **value_template** (*Optional*): Defines a [template](/topics/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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue