mirror of https://github.com/arendst/Tasmota.git
Updated Buttons and Switches (markdown)
parent
6b2ccc9c6b
commit
2c3152f8a7
|
@ -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`**
|
||||
|
||||
|
|
Loading…
Reference in New Issue