Help with my rules

so dont set the trigger to temp becomes greater than or equal to X ?

*it doesnt work as above, still get double notifications after the 5min repeat
will try your way @BorrisTheCat

Also I turned the notification switch off, and the repeat still fired.
does it need the notification to be in trigger events also ?

No because it now needs to fire from something like between 1 and 10. The actions and private boolean stops it creating more than one rule.

That's because you haven't done my rule yet you need the boolean

No

1 Like

hey @bravenel can you please help.
When should I be using "changed" and when should i be using "temp > than" in my trigger events ?

It all depends on when you want it to fire. In a if else end you want it to fire for two state changes. In this you want to do the same but a temperature has multiple states and that means it will fire on each change, this can cause issues if your rule can't handle this (what you had before). But once you have a run once on up and once on down your be good. So that's what the private boolean is doing here.

Hey Borris,
Here was your rule written out. Is the boolean not just a virtual switch ?

You need to set boolean to false before the repeat as per my rule.

Yes and no. It's baked into every rule, more efficient than a switch, can do other things too.

There is a post somewhere, but I can't find it and @bravenel explains the reasons behind a private boolean and what it is.

1 Like

apologies, here was that revised

1 Like

Great this should work. Turn on logs and check if you can.

1 Like

ill test it tonight.

I mean, should a rule really be this difficult to achieve (above). I literally just want to be notified every 5mins if the mrs work fridge goes above a safe level. I wish it was more simple like.

Device: Fridge Temp
Condition: >= 6 degrees
Rule: repeat X every 5 mins on X devices
else if < 6 degrees
stop repeat.

Could i be super painful and ask about the below as well. After this whole rule I am not sure about a bunch of other ones and I ended up clicking and changing a bunch at the same time last night as I thought they were wrong like this fridge one.

thanks @BorrisTheCat <3

I'll have to look tomorrow need to be up in 6 hours. But quick glance yes you need to apply same logic if you have repeats. The others I need to look at and check.

1 Like

thank you

*the laundry one fired with the door open (meant to be a cancel) so edited it up to be the same as the fridge now.

@bravenel is there a way to use variable math to round a number to a certain number of decimal places? (rather than to a whole integer)

Multiply by 1000 (for 3 decimal places), round, then divide by 1000.

2 Likes

hey @BorrisTheCat
those 2 rules with the laundry door and fridge temp seem to be working great now thanks.

the only one I have is this one, the fan Didnt turn off yesterday after the temp dropped down.

The trigger events determine when the Actions will be evaluated.

So in your case when the Cupboard becomes > 35 or = 35 the "Select Actions to Run" will be evaluated and if all the action conditions meet the criteria the actions will be executed.

In your case there is no trigger for the temperature falling below 35

John

3 Likes

As @JohnRob said your need the trigger to be changed but your also need the private boolean to stop it from constantly sending a ON or a OFF.
I still need to see if there is a better way to do this though. The private boolean does work and stops it fully running the rule or the actions unless it needs to. But the rule still is waking up and evaluating on each temperature change. Ideally I don't want it to do that but I don't think it possible and it's a tiny rule so shouldn't be a issue. As long as you don't have lots of different rules all for the same temperature sensor, if that's the case they would be best in the same rule.

1 Like

something more like this ?

no - I dont have multiple things running off the same sensor, I barely have 11 rules (RM4) for my whole house.

No it needs to be same as before

Temperature changed

IF (temp is more than X AND private boolean is true)
ON plug.
Set private boolean to FALSE
ELSE-IF (temp is less than X AND private boolean is false)
OFF plug 
Set private boolean to TRUE
END IF
1 Like

thank you again @BorrisTheCat - I appreciate you taking the time to help me out.
so it looks like this ?

1 Like

should I change this one to changed also ?