Turning lights on at a specific time (6 am), but only if the sunrise is after that time (ie 8 am)

I’m trying to find a way to turn on outside lights in the morning, but only in the winter months when it’s dark out. Am I missing something obvious? I can choose either a time or sunrise.

I want them to turn off at sunrise. If I set them to turn on at 6 am every day and turn off at sunrise, the command to turn them off will run before they’re turned on in the summer…

I had to use webcore to accomplish this.

It’s definitely doable in Webcore with a simple piston.

I was thinking that this might be doable with a few (3 or 4?) Automations and a virtual switch, but it would be messy.

1 Like

Okay, so I have two non-webcore ways that I do this.

  1. My original way. Just edit the automation twice a year to keep up with the sunrise. Annoying, but it’s only twice a year.

  2. This is new and I’m still tweaking it a little but I LOVE IT. I sent up a weather item in my ST (I think it’s this one?? Search on “Smartthings Weather tile” and check them all out). The one I have takes my zipcode and reports back temperature, humidity, and most important, illuminance. This illuminance lets me use the outside light levels to make automations!! So what I can do is say “IF lux is less than 3000 AND kitchen motion sensor senses motion THE turn on kitchen island light for four minutes”. To satisfy your time requirement (since you said morning), you could add a “period of time” to it?? So add in “between 1am and 8am” AND “dark out” for yours?

I love number 2. It works almost super great!! My only issues with it are that I don’t have a great grasp on what’s dark and what’s light. So I’ve been tweaking it for a few weeks trying to figure out my best illuminance trigger. My other issue is that, because I don’t have a personal weather station, I’m using my zipcode, which can vary greatly from one end to the other. So if a storm has finished passing me by and the sun has come back already, but the storm is now over somewhere else in the zipcode, it’s gonna turn on my light if I go in the kitchen. Despite this, I really love it and I’m just so dang proud of myself for making my house feel even more magical to visitors than it already was.


I have a Multisensor Aeon (Aeotec) outside. it reads the illuminance. I have it program the moment the lux = 0 to turn on the light as well the Illuminance greater than 0 to turn off the lights.
its primary is to work as a sensor as well that you can use to turn the lights if movement at some point if you don’t want it as simply schedule dusk to dawn.


Use a state like Home, Away, Daytime, Nighttime as a condition which would be based on sunrise and sunset, or use a virtual switch for the same purpose as a condition.
You need two rules for every cases. Before sunrise and after sunrise.

1 Like

Wow, so many good ideas! I like the illuminance method, but I don’t have an outdoor sensor and I’d rather not add more weather tiles in the IDE that would be at risk at going away in the future… I haven’t played with webcore yet and trying to avoid it if I can :slight_smile:

I already have a few modes based on time of day, so I’ll play around with those and see if they’ll work. Thx!


I’m debating about something similar with blind controls. Fairly new to ST and also avoiding webcore at this point. Obviously option one is there… For option 2, is the search you note for a weather smart app for the new GUI? I’ve been wanting to get detailed weather info (more than luminance) as that could help on blind control. For now, I’m using a fixed period of time and internal luminance sensors that works fine for this time of the year, but will likely be off in the winter. I’m also thinking about logic to close blinds when its forecasted to be warm and sunny vs when its forecasted to be cool and sunny.

Illuminance (or lux) reading is a great idea. :sunglasses:

As for number one, I’m not sure where you live, but in most places below the Arctic Circle sunrise changes by a few minutes every week, but it’s not evenly distributed.

Where I live:

January 1 was 7:25 am

February 1 was 7:14 am

March 1 was 6:40 am

And so on. So if someone is particularly light sensitive, I don’t think just changing it twice a year will be enough.

The sun position is also changing. So if the sensor if fine in the summer, it may not be well positioned in the other seasons (unless on a horizontal unshaded surface). On another thread where I’m trying to deal with glare, I’d been hoping to access the sun position information, and then make decisions partially based on that. More robust, but does not appear to be readily accessible for non power users.

1 Like

I decided to go with your solution. My location modes now define time of day (Morning, Daytime, Evening, Night) and the lights will turn on at 7 AM if the mode is Night. I used to have a Vacation mode, which I ended up moving to a virtual switch. I want the outside lights to turn on/off on the same schedule whether I’m home or not.

When the lights turn on they are dimmed, but if there’s motion outside all outdoor lights turn on to full brightness for 5 minutes, then back to dimmed. To take it a step further, I also turn off the outdoor lights at 11:30, but keep the motion sensors active - at night, when motion stops the lights will go from full brightness back to off.

1 Like

So it turns out I already have a weather tile from the Nest app. What’s weird is that it doesn’t show up as a selectable devide to use as a trigger in an automation condition. Can you use lux as a condition for an automation in your setup?

I figured out I can use it in the Smart Lighting SmartApp, so I have a way to turn a light based on lux. It looks like I need another power meter smart lighting rule to turn it off after x minutes or another way of turning it off. I wish the rule I set up to turn it on had a “turn off after x minutes” option.

PS. Can a smart lighting automation send a notification when it runs? I don’t see that option …

I can! Screenshots attached below.

You may be able to do something with virtual switches, but alas. I don’t use Smart Lighting at all, so I don’t know how to write up an example one. I know in automations you can do the “turn off after x”, which I have!

The automation:

The choices within the automation for the weather tile:

The information within the weather tile itself (from my home screen):