solved: Need help in publishing a Dummy value
Posted: 04 Sep 2019, 21:32
Folks, please help me! I want to find the average of three values and want to publish this value. What I am doing wrong?
Many thanks!
Code: Select all
On Light#Lux Do
Let,4,[VAR#3]
Let,3,[VAR#2]
Let,2,[VAR#1]
Let,1,[Light#Lux]
TaskValueSet,1,1,([VAR#1]+[VAR#2]+[VAR#3])/3
Let,5,[Dummy#Value]
publish,any/state/Umweltsensor/[Dummy#Value]
if [Dummy#Value]>300 do
publish,any/state/Umweltsensor/Beschattung,1
else
publish,any/state/Umweltsensor/Beschattung,0
endif
EndOn