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.

66 lines
2.1 KiB

// Turn on heating if window is closed and 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 && XiaomiAqaraDoorWindowSensorEGWohnzimmerFenster_OpenStatus.state==CLOSED) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 19)
}
end
// Turn on heating during heating time period if window is closed or someone returns home
rule "Heizung Wohnzimmer ein 2"
when
Item Presence_Overall changed to ON or
Item XiaomiAqaraDoorWindowSensorEGWohnzimmerFenster_OpenStatus changed to CLOSED
then
if (ThermostatEGWohnzimmer_Status.state==ON && XiaomiAqaraDoorWindowSensorEGWohnzimmerFenster_OpenStatus.state==CLOSED) {
sendCommand(ThermostatEGWohnzimmer_4_SetTemperature, 19)
}
end
// Turn off (turn to a lower temperature) heating if heating time period is over
rule "Heizung Wohnzimmer aus"
when
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 if window is opened or everybody has left home
rule "Heizung Wohnzimmer aus 2"
when
Item Presence_Overall changed to OFF or
Item XiaomiAqaraDoorWindowSensorEGWohnzimmerFenster_OpenStatus changed to OPEN
then
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