Sun device using wrong time zone

For some reason, although my time zone is set correctly, the sun device is setting the sunrise/sunset about eight hours off from my time zone. There seems to be nothing obvious in my config file that would be overriding this. What could be the culprit?

When I click on the “edit location” button, I am shown a map that indicates my home is in the middle of Amsterdam (second image below.) When I click on the edit pencil icon, I’m brought back to the page in the first image below.

Without info on the correct location of your home we can’t answer.

Which country you DO live in?

1 Like

That’s weird that it would matter, but the U.S.

So, your location is not set correctly, and that’s why the calculation of sun position can’t come with correct results.
You need to find your location on that map and set it as home zone.

2 Likes

Sorry I didn’t realize I didn’t make it clear that I don’t live in the middle of Amsterdam. The problem is that when I move the map to where I really am (and I’m confused why I have to do so,) it doesn’t persist. And besides, the CDT time zone is thousands of miles off from Amsterdam and the Sun seems to ignore the time zone.

Sun needs both to be correct for its calculations.

In the past I had some problems with home zone too (different, needed other radius), and then I defined home zone manually in configuration.yaml

Never had any problem anymore. It always perssist too, as it is defined by config.

# Zone override
zone:
  - name: Home
    latitude: 50.12345
    longitude: 2.9876543
    radius: 30
    icon: mdi:account-multiple

Maybe that will help.

Greetings from the place, where you imaginary live :slight_smile:

2 Likes

Sun needs the actual location, because the sun doesn’t come up at the same time throughout a time zone.

2 Likes

I added this to my configuration.yaml to get it to work:

homeassistant:
   name: Home
   latitude: 4x.xxxxxxxxxx
   longitude: -8x.xxxxxxxxx
2 Likes

FYI, you can go to Settings → System → General → Edit location to get the map view of your location, then drag the Home icon to the correct location (as opposed to simply moving the map). IDK if the OP tried that, but I had the same problem and that’s how I was able to solve it.

Note that you have to zoom out quite a bit in order to drag it a long distance, then zoom back in as you get it closer to your home area. It would be nice to have address lookup built in to make this easier.

1 Like