22.01.2025, 12:42
(22.01.2025, 12:35)baggins Wrote:i already tried that not the issue ...(22.01.2025, 12:31)mariosp Wrote: hello guys i made this script about DHW temperature for push notification and doesnt work the id is true. Here is the scriptDo not use quotes: local min_temp = 30
and im getting this log : User script:5: attempt to compare number with string stack traceback: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 = 'ios:d-UdhwTxj05Mqtku6GH0JU:APA91bGK4SoVNL4AOg20RQTC2DiUMYtbjrk6YhsVPQoP9nDpgboWDpTQO0G6ruMHq2xXwccyI1LsyJL3kflVsfCjzvcrQspFTUOlqLfpjap4dAnHHSF9tE4'
title = 'Push title'
body = 'Χαμηλή Θερμοκρασία ΖΝΧ'
elseif
water_temp >= max_temp
then
push = require('applibs.lmcloud.push')
token = 'ios:d-UdhwTxj05Mqtku6GH0JU:APA91bGK4SoVNL4AOg20RQTC2DiUMYtbjrk6YhsVPQoP9nDpgboWDpTQO0G6ruMHq2xXwccyI1LsyJL3kflVsfCjzvcrQspFTUOlqLfpjap4dAnHHSF9tE4'
title = 'Push title'
body = 'Υψηλή Θερμοκρασία ΖΝΧ'
end
thank you in advance!!