Value checking in Rules sometines don't work
Posted: 25 Mar 2024, 21:05
Hello,
I've just started with EspEasy, looks great, but I have some problems with tyhe Rules section
I use the Dummy plugin P033 with the name "Dummy" and first parameter named "Value"=199, compiled with sources of 20231225.
(I didn't see a change related to this problem in the newer released software)
I've the following Rules:
On Dummy#Value > 100 Do
LogEntry,"Test1"
Endon
On [Dummy#Value] > 100 Do
LogEntry,"Test2"
Endon
On Dummy#Value Do
LogEntry,"Test3"
If Dummy#Value > 100
LogEntry,"Test4" // giving Error : Calculate: Unknown token input: dummy#value = 0
endif
If [Dummy#Value] > 100
LogEntry,"Test5"
endif
LogEntry,"Test6"
Endon
And the result is:
01:12:53.583 : (215656) Info : Dummy: value 1: 199.00
01:12:53.595 : (215516) Info : EVENT: Dummy#Value=199.00
01:12:53.611 : (215420) Info : ACT : LogEntry,"Test3"
01:12:53.615 : (215372) Info : Test3
01:12:53.618 : (215356) Error : Calculate: Unknown token input: dummy#value = 0
01:12:53.628 : (215420) Info : ACT : LogEntry,"Test5"
01:12:53.632 : (215372) Info : Test5
01:12:53.635 : (215420) Info : ACT : LogEntry,"Test6"
01:12:53.639 : (215372) Info : Test6
Why aren't Test1, Test2 and Test4 not working ?
cheers, Stef
I've just started with EspEasy, looks great, but I have some problems with tyhe Rules section
I use the Dummy plugin P033 with the name "Dummy" and first parameter named "Value"=199, compiled with sources of 20231225.
(I didn't see a change related to this problem in the newer released software)
I've the following Rules:
On Dummy#Value > 100 Do
LogEntry,"Test1"
Endon
On [Dummy#Value] > 100 Do
LogEntry,"Test2"
Endon
On Dummy#Value Do
LogEntry,"Test3"
If Dummy#Value > 100
LogEntry,"Test4" // giving Error : Calculate: Unknown token input: dummy#value = 0
endif
If [Dummy#Value] > 100
LogEntry,"Test5"
endif
LogEntry,"Test6"
Endon
And the result is:
01:12:53.583 : (215656) Info : Dummy: value 1: 199.00
01:12:53.595 : (215516) Info : EVENT: Dummy#Value=199.00
01:12:53.611 : (215420) Info : ACT : LogEntry,"Test3"
01:12:53.615 : (215372) Info : Test3
01:12:53.618 : (215356) Error : Calculate: Unknown token input: dummy#value = 0
01:12:53.628 : (215420) Info : ACT : LogEntry,"Test5"
01:12:53.632 : (215372) Info : Test5
01:12:53.635 : (215420) Info : ACT : LogEntry,"Test6"
01:12:53.639 : (215372) Info : Test6
Why aren't Test1, Test2 and Test4 not working ?
cheers, Stef