From 1e6817d4f5a969fed4e0ac49d32acc951584fe12 Mon Sep 17 00:00:00 2001 From: timstanley1985 Date: Wed, 16 Aug 2017 15:13:09 +0100 Subject: [PATCH] Add availability payload (#3170) * Add availability payload * Tweak wording * Update switch.mqtt.markdown --- source/_components/switch.mqtt.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index a31e4bc4301..a32b94b0c2c 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -35,9 +35,11 @@ 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. +- **availability_topic** (*Optional*): The MQTT topic subscribed to receive availability (online/offline) updates. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". +- **payload_available** (*Optional*): The payload that represents the available state, e.g. 'online'. Default is "ON". +- **payload_not_available** (*Optional*): The payload that represents the unavailable state, e.g. 'offline'. Default is "OFF". - **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is `true` if no `state_topic` defined, else `false`. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **retain** (*Optional*): If the published message should have the retain flag on or not.