__Dave__

Untitled

Jun 8th, 2021 (edited)
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. var Timer Meldung = null
  2.  
  3. rule "Meldung Badfenster klein offen"
  4. when
  5.     Item Badefensterklein_TurFensterstatus changed
  6. then
  7.     //cancel timer if running
  8.     Meldung?.cancel
  9.     Meldung = null
  10.  
  11.     if(Badefensterklein_TurFensterstatus.state == OPEN)
  12.         Meldung = createTimer(ZonedDateTime.now.plusMinutes(15), [|
  13.             val telegramAction = getActions("telegram","telegram:telegramBot:8750e150c1")
  14.             if((Localweatherandforecast_Aussentemperatur.state as Number).floatValue <25){
  15.                 telegramAction.sendTelegram("Das Badfenster klein steht schon lรคnger offen und es wird kalt!")
  16.             }
  17.         ])
  18. end
Add Comment
Please, Sign In to add comment