Page 1 of 1

Calculate: Unknown token input: 40 do = 0

Posted: 05 Oct 2022, 11:40
by EDsteve
Hi there,

I am not sure why this simple rule does not work any more. I have used it a few years ago. But when i try using it on the new built. It gives me the error:

Code: Select all

Calculate: Unknown token input: 40 do = 0
Here my (simplified) rules which are based on the wiki:

Code: Select all

on BME_280#Temperature do
 if [soil#Analog]>40 do
   timerSet,1,2
 endif
endon
I found several posts with similar problems but couldn't really get a solution from it.

Would be nice if someone can point me into the right direction.

Cheeers
ED

Re: Calculate: Unknown token input: 40 do = 0

Posted: 05 Oct 2022, 12:01
by chromo23

Code: Select all

on BME_280#Temperature do
 if [soil#Analog]>40 
   timerSet,1,2
 endif
endon
That should do the trick ;)

Edit: to be clear .. the do is only needed for the primary "rule block" like

Code: Select all

On BME_280#Temperature Do
 //something is happening here
Endon
Additional infos can be found in the Rules part of the documentation:
https://espeasy.readthedocs.io/en/lates ... Rules.html

Re: Calculate: Unknown token input: 40 do = 0

Posted: 05 Oct 2022, 12:06
by EDsteve
Grrrrr. And i said it was based on the wiki. But yea. There is no "do" in the wiki in the if statement (any more?).

Thanks for the correction :)
Works as it should now.

Re: Calculate: Unknown token input: 40 do = 0

Posted: 05 Oct 2022, 12:25
by TD-er
Please refer to the ReadTheDocs and not the wiki.
The wiki is really really outdated.