Skip to content

update pressure cooker example #1479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,14 @@ When the `<if-statement>` is preceded by other Tasmota commands you should use `
`ON Power2#state=1 DO IF (Mem1==0) Var1 Var1+1; Mem1 1 ENDIF; Delay 10; Power1 on ENDON`

!!! example
Rule used to control pressure cooker with a Sonoff S31. Once it is finished cooking, shut off the power after 10 minutes.
Rule used to control pressure cooker with a Sonoff S31. Once it is finished cooking, wait for 10 minutes and then shut off the power.

```haskell
Rule1
ON system#boot DO var1 0 ENDON
ON energy#power>100 DO if (var1!=1) ruletimer1 0;var1 1 endif ENDON
ON tele-energy#power<50 DO if (var1==1) var1 2;ruletimer1 600 endif ENDON
ON rules#timer=1 DO Backlog var1 0;power off ENDON
ON energy#power>100 DO if (var1!=1) var1 1; ruletimer1 0; endif ENDON
ON energy#power<100 DO if (var1==1) var1 2; ruletimer1 600 endif ENDON
ON rules#timer=1 DO Backlog var1 0; power off ENDON
```

## Expressions in Rules
Expand Down