Advertisement
EvertJob

Untitled

Jan 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. return {
  2.     on = {
  3.         devices = {
  4.             iDX van weer alarm vandaag!
  5.         }
  6.     },
  7.     execute = function(domoticz)
  8.         local weerAlarm                 = domoticz.devices(iDX van weer alarm vandaag!) -- Haal weer waarschuwingen op
  9.         local weerAlarmCode             = weerAlarm.color
  10.         local weerAlarmBericht          = ""
  11.      
  12.         local jsonData = json:decode(weatherAlarmColors)
  13.         local weatherWarnings = json:decode(weatherAlarmWarnings)
  14.        
  15.         if(weerAlarmCode > 1) then
  16.        
  17.             weerAlarmBericht = "%0A%0A*Let op!*%0AEr is code "..jsonData[""..weerAlarmCode..""].." afgegeven vanwege "..weatherWarnings[""..weerAlarm.text..""]..""
  18.  
  19.         end
  20.      
  21.      sendTelegram(weerAlarmBericht, "group")
  22.    
  23.     end
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement