Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rule "HeaterControl"
- when
- Item Administrator_temp changed
- then
- if (Administrator_temp.state.floatValue() > 24.0 && Administrator_heater.state == ON)
- {
- logInfo("Administrator", "Disabling heater. Current temperature is: " + Administrator_temp.state.floatValue())
- Administrator_heater.postUpdate(OFF)
- }
- else if (Administrator_temp.state.floatValue() < 20.0 && Administrator_heater.state == OFF)
- {
- logInfo("Administrator", "Enabling heater. Current temperature is: " + Administrator_temp.state.floatValue())
- Administrator_heater.postUpdate(ON)
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement