Advertisement
__Dave__

OpenHAB - Garage door open timer

Mar 29th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var Timer garageDoorTimer = null
  2. rule "open mower garage door"
  3. when
  4. Item RasenmaehernaechsterStart changed or
  5. System started
  6. then
  7. val timerTime = new DateTime(RasenmaehernaechsterStart.state.toString).minusMinutes(5)
  8. if (garageDoorTimer !== null) {
  9. garageDoorTimer.reschedule(timerTime)
  10. } else {
  11. garageDoorTimer = createTimer(timerTime.millis,
  12. [ |
  13. ShellyGarageRoboterRollerControl.sendCommang(UP)
  14. ])
  15. }
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement