22.01.2025, 13:11
Code:
local min_temp = 30
local max_temp = 60
local water_temp = event.getvalue()
if water_temp <= min_temp
then
push = require('applibs.lmcloud.push')
token = 'your_token'
title = 'Push title'
body = 'Χαμηλή Θερμοκρασία ΖΝΧ'
res, err = push(token, title, body)
log(res, err)
elseif
water_temp >= max_temp
then
push = require('applibs.lmcloud.push')
token = 'ios:d-UdhwTxj05Mqtku6GH0JU:APA91bGK4SoVNL4AOg20RQTC2DiUMYtbjrk6YhsVPQoP9nDpgboWDpTQO0G6ruMHq2xXwccyI1LsyJL3kflVsfCjzvcrQspFTUOlqLfpjap4dAnHHSF9tE4'
title = 'Push title'
body = 'Υψηλή Θερμοκρασία ΖΝΧ'
res, err = push(token, title, body)
log(res, err)
end
------------------------------
Ctrl+F5
Ctrl+F5