Created
February 25, 2021 08:05
-
-
Save nbartels/3fb7cf9728e8f7f5791bc8a76655500d to your computer and use it in GitHub Desktop.
Washing machine Openhab Rule example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Number counter = 11 | |
rule "washernotification" | |
when | |
Item MeterWasherEnergyPower received update | |
then | |
logInfo("MeterWasherEnergyPower", "received update " + MeterWasherEnergyPower.state) | |
if (MeterWasherEnergyPower.state > 3.0) { | |
counter = 0 | |
} else { | |
if (counter < 12) { | |
counter = counter + 1 | |
} | |
if (counter == 10) { | |
// Send email, telegram whatever here | |
} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment