From aefc4429d856d0e33a85557eef6410b4aa85cb5d Mon Sep 17 00:00:00 2001 From: Artur 'Wodor' Wielogorski Date: Mon, 1 Jun 2020 19:54:29 +0100 Subject: [PATCH] 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? --- source/_integrations/switch.mqtt.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/_integrations/switch.mqtt.markdown b/source/_integrations/switch.mqtt.markdown index 179a946baac..7b3ca3be0b9 100644 --- a/source/_integrations/switch.mqtt.markdown +++ b/source/_integrations/switch.mqtt.markdown @@ -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"