I want to create a rule that checks every day at 12:30 how high the temperature is and how heavy the cloud is. If it is more than 25 ° C and the cloud cover is less than 10% then the blinds should close a bit.
I have created the rule, but the shutters close even if the conditions are not met. What am I doing wrong?
Items:
Number:Temperature localCurrentTemperature "Aktuelle Temperatur [%.1f %unit%]" <temperature> { channel="openweathermap:weather-and-forecast:api:local:current#temperature" }
Number:Pressure localCurrentPressure "Aktuelle Luftdruck [%.1f %unit%]" <pressure> { channel="openweathermap:weather-and-forecast:api:local:current#pressure" }
Number:Dimensionless localCurrentHumidity "Aktuelle Luftfeuchtigkeit [%d %unit%]" <humidity> { channel="openweathermap:weather-and-forecast:api:local:current#humidity" }
Rule:
rule "Sonnenschutz 2" // Rolladen werden teilweise runtergefahren zum Schutz vor der Sonne
when
//Item Test_ss received update ON
Time cron " 0 30 12 1/1 * ? " // jeden Tag 12:30 Uhr
then
//Wenn Temperatur > 25,0°C und Bewölkung < 10,0%
logInfo("Hinweise","Temperatur: " + localCurrentTemperature.state.toString )
logInfo("Hinweise","Bewölkung : " + localCurrentCloudiness.state.toString )
if (((localCurrentTemperature.state as Number) > 25) && (localCurrentCloudiness.state as Number) < 10){
logInfo("Hinweise", "Rolladen im Wohrnzimmer, Küche und Kinder 1 & 2 fahren auf Position Sonnenschutz" )
Blinds_Kind_1.sendCommand(DOWN)
Blinds_Kind_2.sendCommand(DOWN)
Blinds_Kueche_Garten.sendCommand(DOWN)
Blinds_Wohnzimmer_Terrasse.sendCommand(DOWN)
Blinds_Wohnzimmer_Mitte.sendCommand(DOWN)
// Küche nach 12 Sec STOP
Timer4=createTimer(now.plusSeconds(12)) [|
Blinds_Kueche_Garten.sendCommand(STOP)
]
// Terrasse nach 17 Sec STOP
Timer5=createTimer(now.plusSeconds(17)) [|
Blinds_Wohnzimmer_Terrasse.sendCommand(STOP)
]
//Wohnzimmer 3er Fenster nach 15 Sec STOP
Timer6=createTimer(now.plusSeconds(15)) [|
Blinds_Wohnzimmer_Mitte.sendCommand(STOP)
]
}
else {
logInfo("Hinweise", "Keine Sonnenschutz !" )
logInfo("Hinweise","Temperatur: " + localCurrentTemperature.state.toString )
logInfo("Hinweise","Bewölkung : " + localCurrentCloudiness.state.toString )
}
end
Summary
This text will be hidden