Hello I’m new here from webcore. I’m trying to make my first crossover rule and I’m having a little bit of trouble and this seems like the proper forum to place it in as there’s not really a dedicated forum for help.
The power fluctuates briefly to the washing machine so if there’s not stays time requirement in the beginning of the rule I will get constant false triggering.
Here is what I’m working with so far (sorry I’m new it would only let me put one picture in the post):
Welcome to the community and thanks for posting!
You could use something like the following:
You can accomplish this with Variables. I usually split it up into two rules just to keep things clean.
Washing Machine - power changes and is less than 100
IF $context.event.value < 5
Set Variable $isWashingPowerLow = true
Set Variable $isWashingPowerLow = false
Trigger: The approach I’m using here is to have the rule trigger anytime the power changes within a range that we care about and then check if it’s above or below our threshold. Feel free to make the range much bigger if needed or you could just use something like
changes and is not -999 if you just always want it to trigger and run through the flow.
Condition: In the flow, we’re using a context variable to grab the value that triggered the rule. This is an optimization to keep the rule execution fast as it doesn’t need to query for the current state and can instead using the triggering event value.You can select this under Variables: Context > Event > Device > Value Rule 2
$isWashingPowerLow stays true for 5 minutes
Send notification "The wash is done!"
Now that we have a variable that indicates if the power is low or not, we can use that in other rules, for example to trigger whenever the power stays low for 5 minutes to indicate the end of a cycle.