I found this page to do an average with one of my sensors with the rules feature. It works great.
However, I would like to do the same for 2 more of my sensors on the same ESP. I tried to create a new rule but the target value of the first rule is affected by the second rule.
Code: Select all
On Temp#Temperature Do
Let,10,[VAR#9]
[...]
Let,2,[VAR#1]
Let,1,[Temp#Temperature]
TaskValueSet,9,1,([VAR#1]+[VAR#2]+[VAR#3]+[VAR#4]+[VAR#5]+[VAR#6]+[VAR#7]+[VAR#8]+[VAR#9]+[VAR#10])/10
EndOn
Code: Select all
On pH#ph Do
Let,10,[VAR#9]
[...]
Let,2,[VAR#1]
Let,1,[pH#ph]
TaskValueSet,10,1,([VAR#1]+[VAR#2]+[VAR#3]+[VAR#4]+[VAR#5]+[VAR#6]+[VAR#7]+[VAR#8]+[VAR#9]+[VAR#10])/10
EndOn
Someone can help me, please ?
Thanks.
Edit : I found how it works ! We only have 16 variables so for my 3 sensors I can just use 5 var MAX if I understand well.
Do you confirm we can't make for loop to incremente juste one variable ?