Updated Rule Cookbook (markdown)

Michael Ingraham 2019-11-19 13:58:29 -05:00
parent df4915291e
commit 27f8f2e67a
1 changed files with 1 additions and 1 deletions

@ -1490,7 +1490,7 @@ Rule1 1
#### Roller shutter push-button toggle
With a device (e.g., Shelly 2.5) configured for a roller shutter with two relays, you can also connect your regular push-button switches and set up inverted toggle behavior. Pressing a push-button once makes the roller shutter move in a direction, pressing it again stops it. The rules each use a variable to remember the state they're in, where `0 == Stopped` and `1 == Moving`.
With a two relay device (e.g., Shelly 2.5) configured for a roller shutter, you can also connect push-buttons (configured as switch components in this example) and set them for inverted toggle behavior. Pressing a push-button once makes the roller shutter move in one direction. Pressing it again stops it. These rules each use a variable to remember the shutter state where `0 == Stopped` and `1 == Moving`.
```lua
Backlog SwitchTopic 0; SwitchMode1 4; SwitchMode2 4