Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Timer waitTimer = null
- var boolean sentVoltage = false
- rule "so many volts"
- when
- Item solar_BattVolt changed
- then
- logInfo("Voltage: ", solar_BattVolt.state.toString())
- if (!sentVoltage && solar_BattVolt.state > 27.5) {
- sendCommand(ghouse1, ON)
- sentVoltage = true
- waitTimer = createTimer(now.plusMinutes(2))[|
- sentVoltage = false
- ]
- }
- end
- rule "less volts"
- when
- Item solar_BattVolt changed
- then
- logInfo("Volt: ", solar_BattVolt.state.toString())
- if (!sentVoltage && solar_BattVolt.state < 27) {
- sendCommand(ghouse1, OFF)
- sentVoltage = true
- waitTimer = createTimer(now.plusMinutes(5))[|
- sentVoltage = false
- ]
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment