Single notification after delay of analog value in range

I'm trying to be notified when my heat pump goes into a defrost cycle. I know it has if the wattage stays between 450 and 800 for more than 2 minutes. But I'm getting multiple notifications. I was trying to prevent multiple with the a flag variable but it is not working. I'm thinking multiple delays are getting queued up before the 2 minutes is up. Thanks for the help

if you saw my previous ignore it. You already have the variable set so you just need to make sure the variable is a Required Expression. I had to visually do this one so I used what I had for a variable and power source.

With the required expression once the power changes to over 450 but under 800 it will verify the Defost variable and set it to True. Since the Variable needs to be false it will only trigger the events below it once until the power drops to below 400 which will reset the variable to false again allowing it to notify you again. Obviously I don't know what your power drops to after the defrost mode so you can set that last condition to what you need it to.

1 Like

Thanks for the help. I had not used the Required expression. But in your example it seems as though as soon as it executes "Set Cold to true" the Required Expression becomes false and the whole rule would not get executed any more.

FYI, when not in defrost, the power could be lower (such as when the heat pump is off) or it could be higher (when it is actually heating).

Also, I don't want to be notified if the power is between 450 and 800 for less than 2 minutes. It will do this every time the heat pump turns on the heat.

I just moved the "Set HeatpumpDefrost to true" before the delay and notify like @JimmyJames has it, and it seems to be working

1 Like

Good to hear. Glad I could be of service. I had to learn how to use Required Expressions and Variables when I was creating a rule for our Chicken Coop. I put a motion in the Nesting box so we would be alerted when I hen when into lay. However every time the moved it tripped the motion we got an alert, by setting a private boolean and making it a required expression I was able to have it send the alerts once every 30 minutes. We set this alert as we have lots of snakes in the area and don't want them to have a free buffet, hahaha.