HomeKit automations with “if” statements

Hey all

For a long time I’ve assumed this is impossible, but I want to double-check.

I have an automation that turns my office lights’ color at sunset. Specifically it’s a scene called “Office Evening”.

The idea is that if I am working in my office at sunset, I would like the Hue lights to reflect changing light outside. The normal scene is called “Office Day”.

The only problem is that on some occasions I am not in my office at sunset, so the lights are off before sunset and this automation turns them on. This is obviously undesirable.

Is there a Mac or iOS app (3rd party / paid is fine) that can do automations like this:

If sunset + “this scene is active” then “set this other scene” ?

Have you looked at Home+? It can’t check for a specific scene, but it’s very powerful. If you use the scene to turn on a dummy switch then Home+ can definitely check for that (that’s how I do my conditionals checking).

1 Like

I use a similar automation. If you use a Personal Automation (not a Home Automation) set to run at a specific time and select sunset:

you can then run a Shortcut and test for the state of one of the lights in your office that would be on if you are in the office (ie one of the lights in your Office Day scene); if the light is on, run set the new scene (Office Evening).

I hope that this makes sense and helps.

1 Like