mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 12:56:54 +00:00
Fix example on MQTT button page (#20621)
This commit is contained in:
parent
d8522f67eb
commit
5db5ff7b7a
@ -180,20 +180,21 @@ In this section, you will find some real-life examples of how to use this featur
|
|||||||
|
|
||||||
### Full configuration
|
### Full configuration
|
||||||
|
|
||||||
The example below shows a full configuration for a switch.
|
The example below shows a full configuration for a button.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
switch:
|
button:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
unique_id: bedroom_switch_reboot_btn
|
unique_id: bedroom_switch_reboot_btn
|
||||||
name: "Reboot Bedroom Switch"
|
name: "Restart Bedroom Switch"
|
||||||
state_topic: "home/bedroom/switch1"
|
state_topic: "home/bedroom/switch1"
|
||||||
command_topic: "home/bedroom/switch1/commands"
|
command_topic: "home/bedroom/switch1/commands"
|
||||||
availability:
|
availability:
|
||||||
- topic: "home/bedroom/switch1/available"
|
- topic: "home/bedroom/switch1/available"
|
||||||
payload_press: "reboot"
|
payload_press: "restart"
|
||||||
qos: 0
|
qos: 0
|
||||||
retain: false
|
retain: false
|
||||||
entity_category: "config"
|
entity_category: "config"
|
||||||
|
device_class: "restart"
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user