rejuvenate / lovelace-horizon-card

Sun Card successor: Visualize the position of the Sun over the horizon.
MIT License
482 stars 35 forks source link

Wrong sun position? #67

Closed tjorim closed 1 year ago

tjorim commented 1 year ago

Not sure but it seems a problem with AM/PM? See screenshots below, sun just went under but is already on the left?

Screenshot_20230714-191708.png

Screenshot_20230715-182751.png

tjorim commented 1 year ago

To clarify I'm talking about the Pearl Valley one, here is the code snippet:

title: Pearl valley
type: custom:horizon-card
latitude: -33.82
longitude: 18.98
elevation: 120
fields:
  azimuth: true
  elevation: true
  moonrise: true
  moonset: true
  moon_phase: true
v1k70rk4 commented 1 year ago

Based on the images, it appears to me that Pearl Valley is in the UTC-5 timezone, and you are currently in a UTC+7 timezone :) This timezone covers areas such as Western Mongolia, central Indonesia (Jakarta), Russia (Krasnoyarsk), and others... On the upper images, the sun and the moon are in the right places, but there is a 12-hour shift in the lower one.

avataar commented 1 year ago

This Pearl Valley seems to be in South Africa. I suggest you look at the README and the mechanics of the card in the Southern hemisphere :). I'll quote it for you:

In the Northern hemisphere, East is on the left, South is in the middle (when the Sun is in its highest position), and West is on the right. You are facing South and the Sun travels left-to-right.

In the Southern hemisphere, West is on the left, North is in the middle (when the Sun is in its highest position), and East is on the right. You are facing North and the Sun travels right-to-left. You can disable the direction flip by setting southern_flip: false.

Note also where the arrow of the horizon is pointing.

So yes, the Sun just went down and it's where it's supposed to be.

tjorim commented 1 year ago

Thanks @avataar, you're right. First time I'm traveling in the southern hemisphere ;) In that case the card works like it's supposed to. Nice little trick with the arrow, never noticed it before!