Seen this post:TD-er wrote: ↑15 Sep 2019, 14:40 So I will also add it for references to [Var#n] types which I believe will make the rules quite a bit more powerful.
It will be included in PR https://github.com/letscontrolit/ESPEasy/pull/2617
Rules: Clock#Time - possible to compare with a variable?
viewtopic.php?f=6&t=6957&p=39254&hilit= ... ion#p39254
and this ReadTheDocs PR:
https://github.com/letscontrolit/ESPEas ... 0e857f50be
Rules are enhanced with INT variables. INT is added in build 20190916.
The combination of those 2 sentences ..... ????P.R. states:
The variables set with the Let command will be available in rules as VAR#N or INT#N where N is 1..16.
N.B. INT and VAR use the same variable, only INT does round them to 0 decimals.
Does that mean that the sum of variable mix is 16 maximum or ...... #16 Int plus #16 Float?
And how does it work ?
Let,1,10 ......means variable 1 is an Integer 10?
Let,2,10.0 ....means variable 2 is a Float 10.0 ?
If so ... is there a type conversion ?
Let,1,[VAR#2] ....is variable 1 still an Integer?
If so ... trunc or round:
Let,3,10.7 ....means variable 3 is a Float.
Let,1,[VAR#3] ....does Int variable 1 equals 10 or 11?
Let,4,[DS18B20#Temperature] ...does variable 4 get the same number of decimals as defined in the DS18B20 task?
So above variable 4 is a Float.
Is this a correct conversion from Float to Int:
IF [INT#4] <> 0
Or do I need to use
IF [VAR#4] <> 0.0
What is preferred from a performance point of view: DummyTasks or Variables ?
Hope this post can become a Q&A on Let variables VAR and INT
Thanks for help
