Hello, All
First of all thank you for OpenHab application
I have a very simple rule which run the ventilation in Bathroom based on Humidity (Xiaomi sensor via Zigbee2mqtt usb stick)
rule "Bathroom Ventilation Humidity"
when
Item Bathroom_Humidity changed
then
var bathhumidity = (Bathroom_Humidity.state as Number)
logInfo("Bathroom_Humidity: ", bathhumidity.toString)
if (bathhumidity > 70) {
if (sw1_26.state == OFF) {
sw1_26.sendCommand(ON)
sendBroadcastNotification("Ventilation is ON")
}
}
if (bathhumidity < 50) {
if (sw1_26.state == ON) {
sw1_26.sendCommand(OFF)
sendBroadcastNotification("Ventilation is OFF")
}
}
end
It is working fine
But now i have a trouble - if i switch on ventilation manually (I have switch on the wall), ventilation will be switched off by this rule once new data came from sensor (if Humidity < 50).
How can I update my rule that if Ventilation is switched on via Wall Switch - do not switch it off based on Humidity?
Thank you in advance