First Rule .. Looking for Input

Hoping to get input on my first rule:

Purpose of the rule is to:

  • "Fade" (make brighter) certain bulbs over a period of 90 minutes beginning at Sunrise -45 minutes.

  • Then, at Sunrise +46, have those same bulbs fade to off.

Does this look right? (see image)

I'm not sure how the action of "Start lowering" will end. Will it take the bulbs to off or just lower to minimum level and, over what time frame?

Thanks!
sunriser

Seems like these are two different actions with two different triggers, I'd do them as two rules.

  1. Sunrise -45min, Fade (up) to 100 over 90min with 600sec interval
  2. Sunrise +46min, Fade to 0 over Xmin with Ysec interval
2 Likes

Ahhhh, thanks for the input. Maybe two rules are best. I'm just making the switch to Hubitat so rule making and this style of conditional language is new for me; I'm still on the steep side of the learning curve. :slight_smile:

1 Like

You don't need to do it as 2 rules as what you did is correct.
You may need to choose a time period that they dim over and then have them turn off as not all bulbs will turn off at 0% brightness.

1 Like

I think you can do it in one rule and just use the 'wait' command. So trigger would be sunrise, actions would be your fade up then wait till sunset and start fade down.

1 Like

True. I definitively don't want the lights on until sunset.

You could also do it with one rule but two triggers:

Triggers:

When time is sunrise - 45 minutes
OR
When time is sunrise + 45 minutes

Actions:

IF (time is sunrise - 45 minutes) THEN
    dim lights up to 100 over 90 minutes
ELSE
    turn off lights --> delay 45 minutes
    dim lights down to 0 over 45 minutes
ENDIF

I liked what I was seeing @mircolino . Hope you throw it back up. ))

I rewrote this which should be more efficient. I'll know for sure tomorrow morning if it works.:wink:

1 Like

Looks good from this angle. ))

1 Like

Actually, let me know if it works, Because I most certainly won't be in the kitchen tomorrow morning at 5:54AM to see if it does. :wink:

My intention was good but after going to bed late, when the alarm went off at 5:25 well....no bueno. :slight_smile:

BUT, when I came downstairs long after the rule had expired, 4 of the 5 lights (all Lightify) were dimmed down to as low as possible...not off; The Hue bulb in the rule was OFF albeit, I don't know if it ever came on with the trigger....I was snoring.

Soooo, it looks like the last action of turning the bulbs off, didn't work.

Also, looking at my Sunriser rules' events, it shows triggered.

Below is an image of Events and my Rule thus far.

I see that the switch off command was triggered less than 30 milliseconds after the last dim. Perhaps that's too soon? Try adding another 1 minute delay between the last fade and the final switch off.

I'll try that. Were yours off?

Curious. Is it possible to actually run that action via Rule Machine or, is that just for logging purposes. [see image]

Actually... you forgot to add a final 10 minutes delay between the final fade and the off commands, so both commands were triggered one right after the other, and that's why the switch off command didn't work.

Yes mine was off this morning.

Yes, the "Run Actions" button will ignore the trigger(s) and force the rule to run.

Great. I'll make some adjustments and do some testing. :call_me_hand:

Yes, add an 11 minutes delay before the final switch off command and it should work nicely. :+1:

1 Like

Well crap, I ran the actions and it's not fading up. //

Hmm, not sure what is going on.
As a test I just tried this rule (which should be equivalent) at my office and it worked well: