This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Push notifications from LM to iOS and Android devices
#63
(22.01.2025, 12:47)Daniel Wrote: The quotes are the issue, remove from 30 and 60 otherwise it is a string not a number.

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
i tried again it still doent work but i dont get any error
Reply


Messages In This Thread
RE: Push notifications from LM to iOS and Android devices - by mariosp - 22.01.2025, 12:51

Forum Jump: