You’ve invested money into your smart home. You want it to be smart. You’ve purchased light bulbs that cost a minimum of $10 each, and some are upward of $50. You can change their brightness, their warmth, and their color. But for that money, they should do some of the work for you. Good news – with HomeKit, they can. They all can. It just takes a trick or two.

A common ‘smart’ use case for smart bulbs (or dimmers built into a wall switch for that matter) is to ‘Follow the Sun’ – to help wake you up with cool light in the morning, give you bright, cool light throughout the day, and to help you wind down in the evening with ever-dimming, warm light. Some manufacturers have even produced bulbs that specialize in this, including LIFX Mini Day & Dusk and Hue White Ambiance, which give you warmth and brightness controls, and their own way of automatically adjusting them throughout the day. But what if your home has both? Or what if you don’t like the way one manufacturer implements it? Do you really want your bulbs to behave differently?

The good news is, you don’t need to – you can do it all with HomeKit, and it will work with any HomeKit compatible light or switch that supports dimming, warmth or color. The bad news is, Apple makes it a bit tricky.

Follow the Sun the Right Way

Here’s what we want:

At certain times of the day, we want our lights to be a specific brightness and color, without our intervention.

If a light is off, it will stay off, and change automatically the next time we turn it on.

If a light is on, it will stay on, and change automatically throughout the day.

Let’s define our time ranges for the day:

Midnight to 7 AM (Night Light Mode) – 5% brightness, very warm color

7 AM to 9:30 PM (Daytime Mode) – 75% brightness, cool color

9:30 PM to 11:00 PM (Wind Down Mode) – 25% brightness, warm color

11:00 PM to Midnight – back to Night Light Mode

To pull this off, we’re going to use two HomeKit automations for each time period — one automation to handle the transition when the light is already on, and one automation to handle the transition when the light is turned off. You can add more transitions if you like, but these automations can be tricky to work with in the Home app, so we’re keeping it simple here.

Note: The ‘light is off’ transitions will work by triggering an automation when the light itself is turned on. For most lights that have a ‘ramp time’ (including Hue bulbs and Leviton Switches) the automation generally triggers before the ramp time is complete, meaning it works basically flawlessly. For lights with a faster ramp time (including LIFX), it’s common that the bulb turns on in it’s prior state first, and then immediately transitions to the intended state. In the middle of the night, this can have the effect of turning on in Daytime Mode, and then immediately changing to Night Light Mode – you’ll need to use your judgement about whether this is good enough.

Note-Note: These automations will work even if you use a traditional ‘dumb’ switch to turn your bulb on and off, however this is a much longer delay between transitions (up to 20 seconds in my experience), as the bulb needs to ‘boot up’, and join the HomeKit network – if this isn’t acceptable to you, I suggest investing in a smart dimmer switch.

Apps We’ll Need

Yes, ‘Apps’. As in plural. The Home app won’t allow you to configure everything we need on its own, although it will show all of the configurations properly, so this may become easier to manage in the future. We’re going to use the free Eve app to help us out here, and we will use both of them — Eve allows us to fill in the gaps that the Home app has, but oddly enough, it can’t create all of these configurations on it’s own either. (Eve’s limitations are mostly due to current limitations in the HomeKit API, BTW, and not their own product decisions)

Transitions with the Lights On

Let’s start with the easy case – automatically transition with the lights on. Open the Home app, and create a new automation for a ‘Time of Day’. Configure it to trigger every day at 7 AM, and to set your bulb to a cool color, and to 75% brightness.

Ok, that was easy, right? Wait – hold on, we’re not done. If we stop here, the light will turn on tomorrow morning at 7 AM, and if it’s a weekend, we risk waking up our significant other if they’re trying to sleep in! We all know this is a one-way ticket to ending our smart home aspirations, so let’s avoid this!

Now it’s time to jump over to the Eve app. Open the ‘Scenes’ page, and tap the ‘Rules’ tab to list all of our automations. Find and open your new ‘7 00 AM’ automation, and change the name of the automation to something descriptive (you’ll thank me later).

Now open the Conditions page, and tap ‘Add Value Condition’. Find your light, and you’ll see that it has a switch for each of the characteristics that it supports – turn the ‘Power’ switch on, and then set the condition to ‘= On’. Hit ‘Back’ until you’re at the list of automations again.

You’re done! You can now go back to the Home app, open the automation (it won’t be listed under the new name you gave it, sadly), and see that it now says ‘When: 7:00 AM, Daily. Only if <your light’s name here> is On’. Sweet!

Transitions with the Lights Off

HomeKit won’t let us change the brightness or color of a light if the light is off – but it will let us trigger an automation when a light is ‘controlled’, so what we’re going to do here is set those values when the light is switched on. Sound easy? It should be, but unfortunately it’s not.

Go back to the Home app and create a new automation, this time for when ‘An Accessory is Controlled’. Select any other bulb for the trigger (I’ll explain in a moment), and have it trigger when that bulb turns on during Specific times (7:00 AM to 9:30 PM) in this case. Configure light to turn on at 75%, at a cool color, and save it.

Wait, huh? So I need to turn on my living room lights in order to have my bedroom light turn on at the specified brightness? No, not exactly – we’ve just encountered another limitation with the Home app. If you create an automation to control a light, it will not allow you to then change the characteristics of that light – it will only allow you change other accessories.

The Home app will, however, allow you to edit that automation, and change the trigger to the correct light, which is exactly what we’re looking for. Now you can open the automation again, tap on the ‘When’ description, and select the correct lamp.

Done!?

Well, almost – we’ve taken care of the Daytime Mode – you’ll need to rinse and repeat for the Wind Down Mode and the Night Light Mode. Once you get the hang of it, it goes quickly, but it is extraordinarily easy to get lost in the list of automations, so I recommend that you keep things simple for now (you’ll thank me when you configure 5 or 6 lights this way!).

A Word on HomeKit Limitations

I mentioned earlier that Eve can’t handle all of the configuration on it’s own, but it’s not quite true. Oddly, the HomeKit API will only allow 3rd Party apps to trigger scenes via automations, and it will not allow them to trigger individual accessories – if you wanted, you could create each transition as a scene, and manage all of these in Eve, however this will further contribute to clutter in the Home app, so I haven’t gone this route here.

Additionally, you may have noticed that the Home app ignores the name you gave the automation in Eve – this is truly unfortunate, as Apple simply gives you an alphabetical list of automation descriptions, with no way to differentiate or group them. I have to believe that this is simply an oversight, and will be corrected in the future (fingers crossed!).

Apple has gone a long way in the last few years to open up the HomeKit accessory market, with the addition of software-based authorization, and by publishing the Non-Commercial Accessory Protocol, and I believe with a few tweaks and adjustments to the HomeKit API, it can do the same to the 3rd Party App market — here’s hoping!