29.11.2017, 07:26
Map event script to temperature value, change 1/1/1 to setpoint object address:
Code:
temperature = event.getvalue()
setpoint = grp.getvalue('1/1/1')
alerted = storage.get('alerted')
if temperature >= setpoint then
if not alerted then
alert('temperature is above setpoint')
storage.set('alerted', true)
end
else
storage.set('alerted', false)
end