mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 05:16:49 +00:00
Add unique_id to the example of mqtt switch (#13295)
I was surprised that I cannot define the Id of the created switch, it is difficult to use it in automation without an id. It turns out that there is `unique_id` parameter, so why not show it to the world?
This commit is contained in:
parent
fc1d2291f3
commit
aefc4429d8
@ -159,6 +159,7 @@ The example below shows a full configuration for a switch.
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
- platform: mqtt
|
||||
unique_id: bedroom_switch
|
||||
name: "Bedroom Switch"
|
||||
state_topic: "home/bedroom/switch1"
|
||||
command_topic: "home/bedroom/switch1/set"
|
||||
|
Loading…
x
Reference in New Issue
Block a user