So I’m one of those: sunrise & sunset time in HA is slightly different than the one in Alexa. You know those little things that drive you nuts…
Any chance to synchronize it?
Thanks.
Fix Alexa?
Yes, that too… But if you were more creative?
If the difference is constant you can use a sunset / sunrise + offset in your automation / script
Try pnbruckner’s Sun2 custom integration:
Can you explain the difference ?
When you set up HA it asks during onboarding where ‘you’ are located.
In the general box it also allows you to set your height above the sea level
Both affect the standard calculations for sun position. [ It has been known for people to set the base timezone of their base OS different to their actual home timezone (HA largely masks this so that’s not too clever but causes erroneous results) ]
Alexa, pretty much does the same and assumes a HASL based on the area topography.
When you say there is a difference what are we talking about ? a couple of seconds ? a couple of minutes or an hour or more ?
I apreciate that there are some timezones not with a whole hour offset (ie there are 11 with 1/2 hour offsets and I think a few with 20 minute) but that is largely incidental.
Why do you need the two to be in ‘perfect’ sync ?
How are you using this ? (Can affect the solution)
Teras’s suggestion of using the enhanced sun component, uses the exact same calculations but allow for more ‘border events’ like military dawn, navigational dawn etc. in addition to the standard civilian dawn. It’s results for sunrise etc. will be the same.
Let’s start with the latter. I don’t really need it that bad. It is just my mild OCD kicking in. I have automations that are triggered by the sun. The difference seems to be a couple minutes to 2.5 min.
I have HA setup correctly, with the level above the sea. Same with Alexa, as much as it can be set.
Whether the difference is constant, and thus remedied by the offset I have to check it again.
Most likely I’d move those automations to one environment, most likely HA. Not sure though how to trigger the light change in the Flex.
Anyway I was surprised nobody ever noticed it.
After the sun has risen, the default sun integration reports the next day’s sunrise time (as opposed to the current day). The same is true for sunset. It’s my understanding that Phil’s sun integration doesn’t do that and reports the current day’s sunrise/sunset all day.
In general, alexa dumbs down its answers, e.g. you don’t get seconds.
Also once it’s happened the next one will be a different time (unless you are equal sides of the equinox’s) so alexa ‘averages’ these things.
Most people’s automations are all in HA so they never see a conflict (which is why we asked how you even notice a difference as most people don’t watch/ wait for sunrises and sunsets.
The automations are usually to trigger lights or set alarms and if 2.5 minutes is critical just set it 3 minutes earlier.
That is True.
It stores them in registers for the ‘whole day’ and will recalculate at 00:00 for the following day (well it already calculated them yesterday at 00:00 so being lazy, I’d just copy them forward but …)
I’m not sure how this helps him though as presumably he’s talking about triggeres at sunset/sunrise which will be spot on ‘when’ they happen ?
Like you said, differences in sunrise between Alexa and Home Assistant should be minimal (differences potentially due to accuracy of geolocation or possibly the algorithm itself).