14.03.2024, 09:21
(22.12.2018, 17:54)Daniel Wrote: Try this
Code:lux = grp.getvalue('1/1/1') setpoint = grp.getvalue('1/1/2') output = '1/1/3' hysteresis = 20 --in % Limit_ON = setpoint - ((hysteresis/100)*setpoint) Limit_OFF = setpoint + ((hysteresis/100)*setpoint) if (lux >= Limit_OFF) then grp.checkwrite(output, false) elseif (lux <= Limit_ON) then grp.checkwrite(output, true) end
I would like to replace the hysteresis from this script for a time period. So let's say i want an hysteresis for 30 minutes how can this be done?