Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. rule "HeaterControl"
  2. when
  3. Item Administrator_temp changed
  4. then
  5.  
  6. if (Administrator_temp.state.floatValue() > 24.0 && Administrator_heater.state == ON)
  7. {
  8. logInfo("Administrator", "Disabling heater. Current temperature is: " + Administrator_temp.state.floatValue())
  9. Administrator_heater.postUpdate(OFF)
  10. }
  11. else if (Administrator_temp.state.floatValue() < 20.0 && Administrator_heater.state == OFF)
  12. {
  13. logInfo("Administrator", "Enabling heater. Current temperature is: " + Administrator_temp.state.floatValue())
  14. Administrator_heater.postUpdate(ON)
  15. }
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement