Lighting in Rule Machine

Here is what I am trying to do.

When the Santa Light is turned ON: (only between 10:00 PM and 4:00 AM)

  1. The light turns White at 100% brightness and stays that way for 10 minutes.
  2. After 10 minutes, the light changes to Green at 30% brightness and stays on for 3 minutes.
  3. After 3 minutes, the light turns OFF.

Trigger Event

  • Santa Light → turns ON

Actions to Run

Set color: Santa → White
Set level: Santa → 100%

Wait for elapsed time → 0:10:00

Set color: Santa → Green
Set level: Santa → 30%

Wait for elapsed time → 0:03:00

Off: Santa



I tried this last night and the light turned on at 100% white and never changed or went off.

I believe your rule is likely stopping at the "else." I would remove it, then the 10 minute timer expires and it will move to the next step.

1 Like

Like so

What is your trigger to invoke this?
Trigger invokes. Then it attempts to match. In the If statement, if it is true, it will do that action. ELSE if it is not true, it will do that action. The key I think you may be missing is that there is nothing here to monitor if the outlet turns off, which you would need to invoke the next action. Personally, I would set my trigger to "changed" then the trigger would invoke this... if the trigger is the switch turning off, then "On: Foyer..." will be skipped as the on is false (F) and the else path is taken.

That's because that's exactly what your rule says to do.

You don't have any additional actions set up after the 10' wait.

1 Like

Nope, based on what you said you want to do. You were good, except for the "else." Just delete the else.

As well as deleting the ELSE, you could also use "Time between 10:00 PM and 4:00 AM" as a Required Expression and also delete the IF and END-IF. The Required Expression will keep the rule from firing at all except between those two times.

2 Likes

Nevermind, I misread the logic in the first post. Too late for me to still need coffee.

One question though: What do you want the light to do if it is NOT between 10P and 4A? That is what should be in your "else" statement.