How do I set up automatic lighting based on time of day in a smart home?
I want the lights to turn on and off automatically depending on the season and sunrise-sunset times. What devices and apps do I need for that?
I want the lights to turn on and off automatically depending on the season and sunrise-sunset times. What devices and apps do I need for that?
The main thing here is picking between two approaches depending on what you already have. If your home network is built on some open standard like Zigbee, Z-Wave, or Matter and you've got a central hub like Home Assistant or Hubitat, that's ideal - they've got built-in functions for tracking the sun by coordinates. You don't need to worry about daylight saving time, seasonal changes, holidays - everything calculates automatically. The system knows that in January the sun rises later and will turn on the lights when it's supposed to.
If you don't have a hub but you've got individual smart bulbs like Philips Hue, Yeelight, or LIFX, you can use their native apps with built-in schedules. The problem is most of them either only offer fixed times or require a subscription for advanced features. Some bulbs partially solve this through integration with Google Home or Alexa, where you can set up automation based on sunrise-sunset, but it only works if your whole house is tied to one assistant.
There's a gotcha people often forget about: if you set up automation by sun time using coordinates, make sure you've entered them correctly. Even an error of a few kilometers can shift sunrise-sunset by 5-10 minutes. Plus, if you move or travel to different places often, you'll have to recalculate everything from scratch. Mobile apps usually don't even account for this.
I have a Home Assistant hub at home, and you can set up automation there to trigger based on the sun's position - you enter your coordinates, and the system automatically calculates sunrise and sunset for each day :) The easiest way is to buy smart bulbs (Philips Hue, LIFX, or something on Zigbee) and set them up either through their built-in app or through Home Assistant itself.
If you don't want to mess with open platforms - you can just use Google Home or Yandex Station, they also let you create schedules based on time of day. The only downside is you have to manually set the on/off times without automatic tie-in to sunset. Which option you prefer depends on what's convenient for you: if you want to set it up once and forget about it - go with Home Assistant, if you want simplicity and integration with other devices - check out cloud solutions from big companies 🏠
If you already have a hub and don't want to mess with coding, just try adding smart bulbs that support scheduling - many of them (Philips Hue, Yeelight, and others) let you set up automation right in their app without a central hub. The key thing is they understand geolocation and automatically adjust the turn-on time based on sunrise and sunset in your region. It works independently for each bulb, so if your hub suddenly goes down, the lighting will still function anyway.
Here it's not so much about choosing the devices - first figure out how complex a system you're willing to maintain. If you just want the lights to turn on and off based on the sun's schedule, you can skip a central hub: many smart bulbs (Philips Hue, Yeelight, and similar ones) have scheduling built right into the app, and you can set your city's coordinates there too. The system will calculate sunrises and sunsets on its own every day. It works locally, even if the internet goes down.
But here's what matters: if you have a lot of bulbs or need complex logic (like different brightness for different rooms at different times), a central controller will be tough to do without. That's when you need a hub like Home Assistant, which was mentioned earlier - you can set one automation rule there and it'll apply to all your devices at once. The catch is that the hub needs to be on all the time, which means a bit of power consumption and you're dependent on it staying stable. If the hub freezes, all your automation stops.
Start simple: get one or two smart bulbs that support scheduling and see if you like how it works. If you want to expand the system later, it'll be clear whether you actually need a hub or if individual app settings for each bulb will do the trick.
Log into answer.