Updated Rules (markdown)

Adrian Scillato 2018-07-10 08:50:25 -03:00
parent 0deeeb65ea
commit 9182aa2f23
1 changed files with 10 additions and 0 deletions

@ -366,6 +366,16 @@ on SI7021#temperature>%var1% do backlog var1 %value%; publish stat/sonoff/temp %
on SI7021#temperature<%var2% do backlog var2 %value%; publish stat/sonoff/temp %value%; var1 %value%; add1 2; sub2 2 endon
```
* Example: Adjust the value of a sensor and send it by MQTT
This example adds 2 degrees to the measured temperature and then sends that value to a MQTT topic.
```
rule
on tele-SI7021#temperature do backlog var1 %value%; add1 2; event sendtemp endon
on event#sendtemp do publish stat/sonoff/temp %var1% endon
```
------------------------------------------------------------------------------
#### 9. Simple Thermostat Example