Try this:
Code:
value = event.getvalue()
if value == 2 then
message = 'Varmeanlegg: Alarm - ' ..value
end
log(message)