Need help with formula/idea

Ok, so I’m really sensitive to bright lights in the evenings and would like to programmatically change the light intensity based on time of day. I currently do this be using the “after sunset” function, but I usually go to bed before the sunset - so it won’t really help me. It’s great for turning on lights during the night if I have to go to the bathroom, though.

Now, I could set the light intensity based on time of day, but living close to the arctic circle also means there’s a huge difference between how long days are - so that’s not ideal.

This is what I would like to achieve, but don’t have any good ideas on how to do it:

  • from sunset to sunrise: set lights to 25% intensity
  • from sunrise to mid-day: set lights to 100% intensity
  • from mid-day to sunset: set lights to (100-(50-[hours from mid-day to sunset]*[hours left to sunset]))% - or something like it that makes the transition from full brightness to relatively dim lights

Anyone have any idea on how to achieve this? I haven’t found an app that will give me the times of mid-day and sunset, which would have solved a lot of the issues I have…


Perhaps this can help you: Advanced Scheduler App for Homey | Homey and here is the forum thread for the app.

Thanks! Looks like a decent option that might save me a lot of work. Thanks :slight_smile:

This app created dim/color values based on the the sun.
As it’s using flows to forward these values to the ligth device, you can check if it’s afternoon and use a fixed dim setting for morning.

With this app you can create trigger for different sun events (sunrise, sunset, noon…):

Thanks! The first one seems very promising. I need to see how much control it gives. The last one seems a little too complicated for me :rofl:

The Circadian Light app does not seem to be developed further. The community has made some interesting and good suggestions on how the app could be improved. Unfortunately, these points were not followed up by the developer.
With the app Sun Events you can also simulate Circadian Lighting, which is really easy. There is also the possibility to create your own events, which probably makes sense in your case. And the app is still being developed further.
So I would personally recommend the Sun Events app.

1 Like

What do you mean by “create own events”?

You can create your own Sun events as trigger:

(Sorry for German language)

My events
Here you can define your personal events. The events are based on the position of the sun in degrees and you have to define the sunrise and the name.

(Translated with

1 Like