Help with this rule


Yes... That's the point. You were complaining that things were firing multiple times. I thought you only wanted it to fire once per day?


So if it fires at sunset -20 to 100% then I turn on the TV and it dims to 20%, it won't go back and evaluate the time being between sunrise -20 and sunrise and set the lights back to 100%?


Just a thought...Watch the log for the power use as the TV is playing and see how it dips or spikes depending on what is on the screen. I have my son's air cleaner tied to his TV's power use. When he is in his room playing video games or watching YouTube, the TV is on so the air cleaner comes on. BUT...sometimes when the video on the screen blacks out or spikes out, the air cleaner bounces on and off. It happens so fast that the visible rule truth doesn't change.


Can you have different conditions or triggers have different Actions in one Rule?
DO turn lights on
Do turn lights of at this time


No, it doesn't work that way. Rules are either True or False and each CAN have a set of actions but don't necessarily have to. A trigger has one set of actions that happens when the trigger's criteria is met. What you're talking about would be two separate rules or triggers.

That is of course, unless C was the opposite of A and D was the opposite of B. Then you could do it in one rule. If you're talking about a motion rule, where A is motion active and B is the lamp already being off....then you could do it in one rule would would be:

Condition 1: Lamp off
Condition 2: Motion Active

Rule: If Lamp off AND Motion Active

Action for True: Turn lights on.
Action for False: Turn lights off after a delay of 10 minutes with a CANCEL for Truth Change.

That rule would result in the light being on while motion is active and 10 minutes after it stops. However, if motion goes active again during the 10 minute countdown, the countdown would start over again when motion goes inactive again (because of the cancel on truth change).

Is that what you are going for with "Turn off At this time"?

Or are you trying to go with an exterior light being on for a period of time at night? Say sunset to 11pm and you're in away mode? Then you could do it in one rule.

Condition 1: Time between sunset and 11pm
Condition 2: Away mode

Rule: Time between AND Away mode
Action for true: Lights on.
Action for false: Lights off.

So, you have to give me a little more detail about what you are trying to do if you want an accurate answer. Instead of trying to show me the rule, why don't you write it out in words what you are trying to accomplish. Then I can help you diagram the rule from your statements.


How do I get the CANCEL with TRUTH change?


It's available in a regular rule when you enter the delay an option for cancel becomes available. This not available in a trigger rule.



Found it! Is this the same thing as delay cancel pending?


I believe it is, yes.
It seems to behave the same.


Well, yes and no. The delay cancel pending is done from another rule. The cancel on truth change happens in the rule changes from False to True or true to false, depending on which you assign it in. It is basically how you get the "Stays" trigger in RM. Instead of saying a device Stays inactive, the action is started but delayed when it goes inactive and then canceled if it doesn't stay inactive. Basically, we have to do by hand what the folks at webCoRE gave us with the stays trigger. The same logic applies here as it does in webCoRE, you just don't see it in webCoRE. it's all behind the scenes.


OK that makes sense. I am trying to condense some of the RM's and I have this one that I did for undercabinet lights using parenthesis. But I also have a trigger rule to dim the lights at 9:00pm to 50%. Last night the lights went out at 9:00pm and they didn't dim. So I put in a Stop Rule (undercabinet Lights ON/OFF) in the Dimming app however, the lights didn't come on this morning at 4:50 am. So that doesn't work. How do I tie these two apps together so that the lights come on at sunset -20 and then dim at 9:00pm. Then my goodnight routine will turn all the lights off.


It's because you also have a false statement in your rule saying Turn the lights off. You can't have a true and a false statement in your rule. Remove that. Whenever the rule changes from True to False it's going to turn the lights off, which is at 9:30 pm. Then have a trigger of whatever your goodnight routine is to turn them off.

Rules don't have to have true and false statements. They only have to have one or the other.

Lights Turned On. Rule False

OK that makes sense. I will try that and see how it goes. I am really learning a lot and I am enjoying the Hubitat Hub. Everything works much faster than ST was doing lately. Thanks for all your help! I really appreciate it!


My pleasure. The transition from WebCoRE to RM is a big one.


Sure is because with WC we think of ALL the scenarios and put them into one piston. With RM you have to break it down into Conditions and Actions. Which is actually much easier when you think about it. However, there are some complex things that can be done with WC which some of my pistons include. They probably won't be converted.


Yeah, I have some calendar notifications that get trigger through IFTTT that have parameters passed from Outlook 365 and Google Calendar, like the start and end times. No way to do that in RM yet. So, they'll stay in WebCoRe for now.


These didn't fire again. Not sure why these aren't working. They say TRUE.


When did they CHANGE to true?!? You still aren't getting the concept of boolean rules. The actions only take place when the rule changes from True to False or False to True. If you want something to always happen at a specific time, you have to use a trigger or a triggered rule. Do you need me to go over the differences in the 3 again?

ON m-f your rule will go true at 4:50 am and false at either 9pm or 11. Those are the only two times that the rule will change from True to false or false to true. So, that is the only time the actions would be taken. Again...why don't you put into regular words EXACTLY what you want to happen and I can build the rules for your in words for you to put in. But you have to be explicit with ALL of the situations you want the rules to do.


I understand how the rule works. And that is how I have it setup but for some reason (which I think is related to the generic z-wave switch) it did not happen at sunset -20. I was sitting in the kitchen and other lights went on but not the undercabinet lights. so I set it to Refresh also in the Action. It did dim tonight at 9:00. I did a test of just turning the undercabinet lights on at a certain time while I was trying to figure this out and waited and they did turn on. But I had Refreshed the device prior. I will see how this works. I have a few devices that seem to be lacking in responsiveness even though I have them in the z-wave polling. As for the Deck lights. These are particular because they are using the H801 RBGW controller but I only have white lights connected to them. I had selected them as switches but I needed to select them as dimmers even though they don't dim. Anyways, when I did a test on them, they worked doing it this way. I will see what tomorrow brings. :wink:


Okay, if you're not going to actually listen or answer any of my questions, I can't help you. Best of luck.