From ae3c3e2ab615690c0c24f35688a9ba880edd333c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Thu, 27 Jul 2017 12:37:25 +0100 Subject: [PATCH] Update switch.mqtt.markdown (#3034) --- source/_components/switch.mqtt.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 546ad7fc78f..a31e4bc4301 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -35,6 +35,7 @@ Configuration variables: - **name** (*Optional*): The name of the switch. Default is 'MQTT Switch'. - **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. - **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state. +- **availability_topic** (*Optional*): The MQTT topic subscribed to receive availability (online/offline) updates. The payload is the same for the command_topic. - **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`. @@ -61,6 +62,7 @@ switch: name: "Bedroom Switch" state_topic: "home/bedroom/switch1" command_topic: "home/bedroom/switch1/set" + availability_topic: "home/bedroom/switch1/available" payload_on: "ON" payload_off: "OFF" optimistic: false