mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Add availability payload (#3170)
* Add availability payload * Tweak wording * Update switch.mqtt.markdown
This commit is contained in:
parent
4072708ca6
commit
1e6817d4f5
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user