Logic Machine Forum
Group value is temperature ... how - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Group value is temperature ... how (/showthread.php?tid=1268)



Group value is temperature ... how - kostal.borek - 01.03.2018

Hi,
I have a condition in the script - 2 byte group address temperature. How should I write to compare if the temperature is equal to or less than any value?
thanks
Borek


RE: Group value is temperature ... how - Jørn - 01.03.2018

Code:
value = event.getvalue()
if value >= 25 then --if value is 25 or larger then
 dosomething
elseif value < 25 then --if value is smaller than 25 then
 dosomething
end