Help writing Rule

I have been racking my brain and playing around with this rule and still cant figure it out. I know its possible and probably easy for some of you so I'm hoping you can help out.

I want to click my Samsung Button (Trigger).

Actions: I would like to Capture closet group, dim to 1%, and Turn on cabinet lights. (This part is easy)

Next, when Shaun's presence changes to not present OR a delay of 15 minutes go by (whatever comes first) I want to turn the cabinet off and restore closet.

I have attached a screenshot of what I have so far BUT it is NOT FINISHED looking for feedback.

You need to remove your ELSE. You can't have an ELSE unless you have an IF. So, this would error out as a malformed rule. Then just remove the off cabinet and the restore above the else as well.

To get your delay, you want to remove the delay that you have and add a timeout to the wait for event. That will either trigger it when you leave or 15 mins is up. Whichever comes first.

1 Like

First of all you have an ELSE but no IF statement.
On the Wait for events you can add a timeout of 15 minutes.
Remove everything after and including the ELSE

1 Like

Thanks guys I knew the rule I posted was wrong and the ELSE shouldn't be there I just posted it so you could see where my mis-guided logic was going haha.

How does this look?

That's it.

You're awesome!! Thank you so much for the help!!!

1 Like

Most welcome!!