Creating a leaving home setup when a button is pressed

I have a Hubitat 8 Pro and various Lutron Dimmers and Picos.

I have a 2 button Pico where I have set Button 2 to switch on and off lights based on waiting actions for various times. Screenshot of the actions for Button 2 below using the "Button Controllers" app.

The current setup seems to only work when I leave the house before sunset. I would like the rules to work even if it is past sunset.

i.e if I leave after sunset I want the rules to switch on lights randomly and for the lights to switch off on the set times.

The wait at the beginning will be causing your problem..... The solution... Hmmm... Just remove it...?

1 Like

This is because of your wait action. If it is already past that time, your wait wonā€™t run until the next day. Your best best would be a conditional IF/THEN:

If time between XYZ time and Sunset +19,
Wait for Event
All your actions,
Else,
All your Actions
End-IF

2 Likes

This is great!
Wait for events needs to be set up as per above, right?

For 'all you actions' is it possible to have them referenced rather than have to type them/set them all again following the Else section

Correct. I was just typing things quickly. Basically, if you leave during the day time, you want the rule to wait until sunset+20 before having your lights act like someone is home. Thatā€™s the first part of the IF. The else is saying that it is already dark just do the light stuff.

Yes. The select all the squares on the left of each action you want to copy. Select them in the order you want them to run. At the end of the actions, a new symbol will show allowing you save them to the clipboard. Once you save them, another symbol pops up allowing you to add them at the end of the actions.

1 Like

One other optionm which may or may not apply here, is you can define an RM rule with no trigger, defining just a set of Actions, then trigger the rule from another rule, and I assume Button Controller.

2 Likes