mirror of https://github.com/arendst/Tasmota.git
Updated Rule Cookbook (markdown)
parent
f7b8378a8f
commit
36574b2ee6
|
@ -10,8 +10,8 @@
|
|||
- [Thermostat Example](#thermostat-example)
|
||||
- [Solar heater control](#solar-heater-control)
|
||||
- [Energy Saving Smart Switch](#energy-saving-smart-switch)
|
||||
- [Staircase Timer](#staircase-timer)
|
||||
- [Advanced PIR rules for Staircase](#advanced-pir-rules-for-staircase)
|
||||
- [Time-delayed Auto-off Switch](#Time-delayed-Auto-off-Switch)
|
||||
- [Auto-off Motion Sense Switch](#Auto-off-Motion-Sense-Switch)
|
||||
- [Controlling Timers Enabled from a switch](#controlling-timers-enable-from-a-switch)
|
||||
- [Toggle a Relay only when holding the button for 2 seconds](#toggle-a-relay-only-when-holding-the-button-for-2-seconds)
|
||||
- Using Sunrise and Sunset
|
||||
|
@ -464,7 +464,7 @@ Rule on switch1#state=1 do var1 100 endon on switch1#state=0 do backlog var1 0;
|
|||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
#### Staircase Timer
|
||||
#### Time-delayed Auto-off Switch
|
||||
**Rule:**
|
||||
|
||||
`Rule1 on button1#state do backlog power1 %value%; RuleTimer1 600 endon on Rules#Timer=1 do power1 off endon`
|
||||
|
@ -487,7 +487,7 @@ Rule on switch1#state=1 do var1 100 endon on switch1#state=0 do backlog var1 0;
|
|||
[Back To Top](#top)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
#### Advanced PIR rules for Staircase
|
||||
#### Auto-off Motion Sense Light
|
||||
Example works fine on a Wemos D1 Mini. Used as night light with motion sensor or as ambient light on floor or kitchen.
|
||||
I connect an LED Strip WS2812 on D1 and the PIR on D2 and a LDR on A0 (voltage divider with 10k ohm resistor)
|
||||
|
||||
|
|
Loading…
Reference in New Issue