Hello,
after reading the great tutorials on node-red i am playing around with it now.
do you know, if there is a possibility to get the previous.state in node-red also? i am trying to convert this rule:
// Luftfeuchtigkeit im Wohnzimmer steigt von unter 60% auf >= 60% an oder sinkt von >= 60% auf unter 60% ab --> iOS-Benachrichtigung (Broadcast)
rule "Luftfeuchtigkeit_Wohnzimmer_zu_hoch"
when
Item Tado_zone_Wohnzimmer_Humidity changed
then
if ((Tado_zone_Wohnzimmer_Humidity.state >= 60 && previousState < 60) && (Rule_Luftfeuchtigkeit.state == ON)) {
sendBroadcastNotification(
"Im Wohnzimmer ist die Luftfeuchtigkeit zu hoch ("+Tado_zone_Wohnzimmer_Humidity.state+"%).")
}
end
rule "Luftfeuchtigkeit_Wohnzimmer_wieder_ok"
when
Item Tado_zone_Wohnzimmer_Humidity changed
then
if ((Tado_zone_Wohnzimmer_Humidity.state < 60 && previousState >= 60) && (Rule_Luftfeuchtigkeit.state == ON)) {
sendBroadcastNotification(
"Im Wohnzimmer ist die Luftfeuchtigkeit wieder ok ("+Tado_zone_Wohnzimmer_Humidity.state+"%).")
}
end
thanks for help!
yours, alex