mirror of https://github.com/arendst/Tasmota.git
Updated Buttons and Switches (markdown)
parent
43efcab29d
commit
75c22ee421
|
@ -2,9 +2,6 @@ Buttons and switches are primarily used to toggle (turn ON or OFF) device relays
|
||||||
|
|
||||||
> Other than relays, Tasmota does not publish the state of components (switches, buttons, sensors, etc.) in real-time. Only messages corresponding to relays are transmitted in real-time. The state of components is transmitted automatically each [TelePeriod](Commands#teleperiod) via the `SENSORS` message.
|
> Other than relays, Tasmota does not publish the state of components (switches, buttons, sensors, etc.) in real-time. Only messages corresponding to relays are transmitted in real-time. The state of components is transmitted automatically each [TelePeriod](Commands#teleperiod) via the `SENSORS` message.
|
||||||
|
|
||||||
## How to make Button or Switch not toggle a relay
|
|
||||||
By default `switch<x>` will actuate `relay<x>`. To ignore this default behavior, define a rule which triggers on the button/switch action.
|
|
||||||
|
|
||||||
## Button vs. Switch
|
## Button vs. Switch
|
||||||
A button (also called a push-button) is a momentary or non-latching switch which causes a temporary change in the state of an electrical circuit only while the switch is pressed. An automatic mechanism (i.e. a spring) returns the switch to its default position immediately afterwards, restoring the initial circuit condition.
|
A button (also called a push-button) is a momentary or non-latching switch which causes a temporary change in the state of an electrical circuit only while the switch is pressed. An automatic mechanism (i.e. a spring) returns the switch to its default position immediately afterwards, restoring the initial circuit condition.
|
||||||
|
|
||||||
|
@ -32,7 +29,9 @@ In Tasmota a `Switch` is any switch or push-button additionally connected to a f
|
||||||
- [PIR](https://en.wikipedia.org/wiki/Passive_infrared_sensor) - even though it's technically a sensor it is [configured as a switch in Tasmota](PIR-Motion-Sensors)
|
- [PIR](https://en.wikipedia.org/wiki/Passive_infrared_sensor) - even though it's technically a sensor it is [configured as a switch in Tasmota](PIR-Motion-Sensors)
|
||||||
- [mechanical push-button](https://en.wikipedia.org/wiki/Push-button)
|
- [mechanical push-button](https://en.wikipedia.org/wiki/Push-button)
|
||||||
|
|
||||||
By default a switch toggles the corresponding relay. Every time the switch gets flipped, the relay changes its state (ON or OFF). Apart from the default toggling of the relay, switches can be configured to send messages to different MQTT topics, or send commands to other Tasmota devices.
|
By default a switch toggles the corresponding relay. Every time the switch gets flipped, the relay changes its state (ON or OFF). Instead of the default toggling of the relay, switches can be configured to send messages to different MQTT topics, or send commands to other Tasmota devices.
|
||||||
|
|
||||||
|
> By default `Switch<x>` will trigger `Relay<x>`. To ignore this behavior, define a rule which triggers on `Switch#State` or use `[Switchtopic](Commands#Switchtopic)`.
|
||||||
|
|
||||||
>Now, to make everything a little confusing: A push-button can be configured as a `Switch` and a toggle switch can be configured as a `Button`. Configuring a toggle switch as a `Button` is not recommended!
|
>Now, to make everything a little confusing: A push-button can be configured as a `Switch` and a toggle switch can be configured as a `Button`. Configuring a toggle switch as a `Button` is not recommended!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue