From 2c3152f8a702c02870a5beaf2c20745c721a2f94 Mon Sep 17 00:00:00 2001 From: blakadder Date: Tue, 7 May 2019 11:06:47 +0200 Subject: [PATCH] Updated Buttons and Switches (markdown) --- Buttons-and-Switches.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Buttons-and-Switches.md b/Buttons-and-Switches.md index d852206a..c5a37356 100644 --- a/Buttons-and-Switches.md +++ b/Buttons-and-Switches.md @@ -109,20 +109,21 @@ The switch will send a toggle command when pressed and another toggle command wh >Not sure why you would use this one, but hey, its here when you need it. -## [SwitchTopic](Commands#switchtopic) -SwitchTopic and ButtonTopic are almost identical in use. Read [ButtonTopic](Button-usage#ButtonTopic) for its guide. -### Note about SwitchTopic and MQTT +### Note about SwitchTopic (or ButtonTopic) and MQTT -When using `SwitchTopic 1` or `2` and your MQTT broker becomes unavailable, Tasmota falls back to default `SwitchTopic 0`, which is not optimal. +When using `SwitchTopic 1` or `2` (or `ButtonTopic 1` or `2) and your MQTT broker becomes unavailable, Tasmota falls back to default `SwitchTopic 0` (or `ButtonTopic 0`), which is not optimal. -To avoid this, instead of `SwitchTopic`, we recommend using this rule which works always. +To avoid this recommend using rules instead. They simply always work. +Example: ``` Rule1 on switch1#state do publish cmnd/custom-topic/POWER %value% endon Rule1 1 ``` -If you still need to use SwitchTopic, read on! +If you still need to use SwitchTopic or ButtonTopic, read on! +## [SwitchTopic](Commands#switchtopic) +SwitchTopic and ButtonTopic are almost identical in use. You can use this guide interchangeably for both or read [ButtonTopic](Button-usage#ButtonTopic). **`SwitchTopic 0`**