From 49cc1ebdb39beea2a770d9c2c9feb901d1168fc6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 25 Mar 2016 10:07:18 +0100 Subject: [PATCH] Add sensor class --- source/_components/binary_sensor.mqtt.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_components/binary_sensor.mqtt.markdown b/source/_components/binary_sensor.mqtt.markdown index 49b82140a5b..ddb23f9df2e 100644 --- a/source/_components/binary_sensor.mqtt.markdown +++ b/source/_components/binary_sensor.mqtt.markdown @@ -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: