Fix example on MQTT button page (#20621)

This commit is contained in:
Franck Nijhof 2021-12-08 21:52:31 +01:00 committed by GitHub
parent a0d701ccdb
commit 2bb896b758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,20 +180,21 @@ In this section, you will find some real-life examples of how to use this featur
### Full configuration
The example below shows a full configuration for a switch.
The example below shows a full configuration for a button.
```yaml
# Example configuration.yaml entry
switch:
button:
- platform: mqtt
unique_id: bedroom_switch_reboot_btn
name: "Reboot Bedroom Switch"
name: "Restart Bedroom Switch"
state_topic: "home/bedroom/switch1"
command_topic: "home/bedroom/switch1/commands"
availability:
- topic: "home/bedroom/switch1/available"
payload_press: "reboot"
payload_press: "restart"
qos: 0
retain: false
entity_category: "config"
device_class: "restart"
```