Next_rising and next_setting still shows appr. 2 minutes too late (GMT+1, central europe, Slovenia,)

Hello @Edwin_D,
three very important reasons that come to my mind immediately for me to use the very useful sun.sun integration over a lux sensor:

  1. It does not rely on addition technology (a lux sensor would e.g. be paired via zigbee and be battery powered).
  2. A lux sensor in my opinion is way less stable indicator: Imagine there is a bright light to the sensor because of a car passing by, … . I’d need at least a few conditions to mitigate false triggers. In my case a door opens because of this trigger which is crucial to be as reliable as possible.
  3. sun.sun does not even rely on internet connection, the next_sunrise is calculated locally. The only thing it need to work perfectly is the current timestamp/system time.

You’re right that three minutes don’t matter too much (at least for me), but it’s a bug - and why not make the product/code/documentation better?

I always wondered why my Home Assistant sunrise is off the others I got - now I know.

Have a nice evening.

1 Like

Not really for me to judge.
Some need it to be perfect for use cases I might not be able to imagine or comprehend.
Others are just perfectionists and want it that way.
I am probably refusing to acknowledge myself as a perfectionist, but I am somewhat anyway.

2 Likes

Your arguments are valid. As said, I do value the integration as well, and I by no means meant to imply the integration is without merit. I love it, I use it. I just wonder how accurate you’d need it to be. And if accuracy is key, direct measurement is always better than inference, especially if there are many influencing factors. And of course I was joking a bit, there are no elephants near here.

If you do ever decide to use a lux sensor, you should know you do not need to worry about this. The difference between lux from the sun and artificial light is huge. Artificial light will register a bit, but it will be neglible. Direct sunligth can reach 120.000 lux. Here you can find a graph of a modern car headlight, inside the beam (which should be pointed downward) at various distances:


So you would need a very very bad lux sensor placement to worry about it.

Even if you want to register at low light condition (dusk) the last light disappears quite quickly (if you can live with a minute or two accuracy :slight_smile: ). This may be different nearer to the Earth’s poles. I live in the Netherlands, no where near the Equator, where the sun disappears within a minute.

If you use a threshold sensor, there will not be any weird effects from passing cars and varying light conditions. Ad as for battery use. Yes, it is there. I believe for my (non-cloud dependent) Zigbee sensor it is a CR2450 cell, for me that lasted way past one year.