How do I get this rule so that BOTH condition need to be met, not just ANY? I thought i knew , but it seems to be alluding me this morning.
Triggers are events, not conditions; they are moments in time and do not have truth values.
You could use an IF THEN
... END-IF
in your actions, around all of the actions or just specific ones. Or in your case, it seems like you could get the same effect by adding "Mode is Day, Evening" as required expression, which will prevent the rule from triggering when false. (There are differences between the two that may not matter, depending on what you're doing in your actions — and what you want to happen.)
Hummm... I will try that . For background,this rulle involves a Hue Outdoor Motion sensor on out patio, (right out side our floor to ceiling windows that over look the patio) and uses the illimnance reading form that to turn on a lamp inside in low light during the day. Normally, the natural light is enough, but when it overcast we like to have the light on.
What Bert said is spot on.
If you want it to be both mode day or evening and the Illuminance being true add an IF statement for the mode being day or evening as the first line of your actions. And and END-IF at the bottom.
The required expression should achieve the same outcome as the IF-THEN-ELSE.
@lcw731 - I think you have setup what @bertabcd1234 described.
My only question is whether subsequent reporting of illuminance will re-trigger? I can never remember that stuff ...
Wow I need more caffeine ... totally misread what he had in his last example. I think what he has is good but I'd add a time on the wait fore in the action so if it bumps around 300 it's not turning things on and off. In fact you may want to change the trigger to just < and the action to a > and maybe 305 or something.
Well, my expected (Hope?) is that if illuminance falls below 300, the light comes on. Once it goes above 300, it turns off. If it falls back below, it comes back on. In Texas, for the most part this rule is only gong really come into play early morning between about 7:00 and 9:00 or evenings about an hour before sunset. Other than that, it would be rainy/overcast days, which we don't have many of.
Ohh , good catch. the first version of this had AND STAYS for 15 min. Totally forgot to put that back in,
Here's the latest revision.
Ill be honest here. For the most part I've been using Event Engine for a while, but I'm starting to have more interest in Rule Machine, Etc. I'm just not too sure how to write these rules yet.
Just curious, How do you get the IF THEN ?
EDIT: as of right now, it seems to be turning it on regardless of the illumination.
The IF-THEN-ELSE is a conditional action.
Should that last action be off?
ahh good catch ...
Looks like you referenced a button device where you shouldn't? Have you got another screenshot of the rule?
Perhaps not so much that it is a button.... Go to the device page for the lamp and see what commands work so you can get what you want in the rule. Looks like it doesn't handle the dim, but best to test it on the device page. If it works on the device page, turn on logging in the rule to double-check exactly where the error is occurring.
Try running the set level command, does it work?