Files, scripts, howtos and more for openHAB.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
1.5 KiB

// Turn on heating if someone is at home
rule "Heizung Wohnzimmer ein"
when
Time cron "0 30 6 ? * MON" or
Time cron "0 30 6 ? * TUE" or
Time cron "0 30 6 ? * WED" or
Time cron "0 30 6 ? * THU" or
Time cron "0 30 6 ? * FRI" or
Time cron "0 0 8 ? * SAT" or
Time cron "0 0 8 ? * SUN"
then
ThermostatEGWohnzimmer_Status.sendCommand(ON)
if (Presence_Overall.state==ON) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 19)
}
end
// Turn on heating if someone returns home during heating time period
rule "Heizung Wohnzimmer ein 2"
when
Item Presence_Overall changed to ON
then
if (ThermostatEGWohnzimmer_Status.state==ON) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 19)
}
end
// Turn off (turn to a lower temperature) heating if everybody has left home or heating time period is over
rule "Heizung Wohnzimmer aus"
when
Item Presence_Overall changed to OFF or
Time cron "0 0 22 ? * MON" or
Time cron "0 0 22 ? * TUE" or
Time cron "0 0 22 ? * WED" or
Time cron "0 0 22 ? * THU" or
Time cron "0 0 22 ? * FRI" or
Time cron "0 0 22 ? * SAT" or
Time cron "0 0 22 ? * SUN"
then
ThermostatEGWohnzimmer_Status.sendCommand(OFF)
if (TV_Power.state==OFF) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 16)
}
end
// Turn off (turn to a lower temperature) heating after TV has turned off
rule "Heizung Wohnzimmer aus TV aus"
when
Item TV_Power changed from ON to OFF
then
if (ThermostatEGWohnzimmer_Status.state==OFF) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 16)
}
end