Calculate: Unknown token input: 40 do = 0

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
EDsteve
Normal user
Posts: 61
Joined: 11 May 2018, 21:13

Calculate: Unknown token input: 40 do = 0

#1 Post by EDsteve » 05 Oct 2022, 11:40

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

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

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

#2 Post by chromo23 » 05 Oct 2022, 12:01

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

User avatar
EDsteve
Normal user
Posts: 61
Joined: 11 May 2018, 21:13

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

#3 Post by EDsteve » 05 Oct 2022, 12:06

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.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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

#4 Post by TD-er » 05 Oct 2022, 12:25

Please refer to the ReadTheDocs and not the wiki.
The wiki is really really outdated.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 27 guests