From d483e549a31b22fdf6f5b1a522d79d025db77ac4 Mon Sep 17 00:00:00 2001 From: Ryan Davies Date: Sat, 21 Jul 2018 09:05:02 +1200 Subject: [PATCH] Updates MQTT switch to add state_ configurations (#5776) --- source/_components/switch.mqtt.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 295ae106db1..ff824f97137 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -46,6 +46,16 @@ state_topic: description: The MQTT topic subscribed to receive state updates. required: false type: string +state_on: + description: The payload that represents the on state. + required: false + type: string + default: ON +state_off: + description: The payload that represents the off state. + required: false + type: string + default: OFF command_topic: description: The MQTT topic to publish commands to change the switch state. required: false @@ -117,6 +127,8 @@ switch: availability_topic: "home/bedroom/switch1/available" payload_on: "ON" payload_off: "OFF" + state_on: "ON" + state_off: "OFF" optimistic: false qos: 0 retain: true