From 0e0b98f789a0aa423a49b478e733f5e4678489bf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 Nov 2015 15:51:07 +0100 Subject: [PATCH] Add motor docs --- source/_components/sensor.mqtt.markdown | 1 + source/_components/switch.mqtt.markdown | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/_components/sensor.mqtt.markdown b/source/_components/sensor.mqtt.markdown index 382b4bc0762..e822867625d 100644 --- a/source/_components/sensor.mqtt.markdown +++ b/source/_components/sensor.mqtt.markdown @@ -24,6 +24,7 @@ sensor: name: "MQTT Sensor" qos: 0 unit_of_measurement: "°C" + ``` Configuration variables: diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 717844d1849..24849333339 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -31,6 +31,7 @@ switch: payload_on: "ON" payload_off: "OFF" optimistic: false + state_format: ``` Configuration variables: @@ -42,6 +43,7 @@ Configuration variables: - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". - **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false. +- **state_format** (*Optional*): Value to parse.

Make sure that your topics match exact. `some-topic/` and `some-topic` are different topics.