Skip to content

Commit ae3c3e2

Browse files
abmantisfabaff
authored andcommitted
Update switch.mqtt.markdown (home-assistant#3034)
1 parent c83d11a commit ae3c3e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/_components/switch.mqtt.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Configuration variables:
3535
- **name** (*Optional*): The name of the switch. Default is 'MQTT Switch'.
3636
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates.
3737
- **command_topic** (*Required*): The MQTT topic to publish commands to change the switch state.
38+
- **availability_topic** (*Optional*): The MQTT topic subscribed to receive availability (online/offline) updates. The payload is the same for the command_topic.
3839
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
3940
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
4041
- **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:
6162
name: "Bedroom Switch"
6263
state_topic: "home/bedroom/switch1"
6364
command_topic: "home/bedroom/switch1/set"
65+
availability_topic: "home/bedroom/switch1/available"
6466
payload_on: "ON"
6567
payload_off: "OFF"
6668
optimistic: false

0 commit comments

Comments
 (0)