Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Sun Rise, Sun Set, Dawn and Dusk from Sun Entity #101

Open
RobertZwets opened this issue Nov 20, 2023 · 8 comments
Open

No Sun Rise, Sun Set, Dawn and Dusk from Sun Entity #101

RobertZwets opened this issue Nov 20, 2023 · 8 comments

Comments

@RobertZwets
Copy link

My Sun States:
next_dawn: 2023-11-21T06:32:47.745417+00:00
next_dusk: 2023-11-21T16:22:14.125238+00:00
next_midnight: 2023-11-20T23:27:47+00:00
next_noon: 2023-11-21T11:27:39+00:00
next_rising: 2023-11-21T07:11:48.323844+00:00
next_setting: 2023-11-21T15:43:15.466810+00:00
elevation: -39.28
azimuth: 289.7
rising: false
friendly_name: Sun

My Set up:

type: custom:horizon-card
title: Example Horizon Card
moon: true
refresh_period: 60
fields:
sunrise: true
sunset: true
dawn: true
noon: true
dusk: true
azimuth: true
sun_azimuth: true
moon_azimuth: true
elevation: true
sun_elevation: true
moon_elevation: true
moonrise: true
moonset: true
moon_phase: true
southern_flip: false
moon_phase_rotation: 0
language: en
latitude: 51.99
longitude: 4.49
elevation: -2
time_zone: Europe/Amsterdam
time_format: language
number_format: language
debug_level: 0

Card showing:
image

@dziban303
Copy link

Same here

@medivb
Copy link

medivb commented Jan 29, 2024

Same here as well...

@bjkluft
Copy link

bjkluft commented Jan 30, 2024

I have the same issue as well.
On the positive site I've found the reason why no data is shown: Your elevation level is a negative value, which here in the Netherlands is a common thing. Mine officially is -1 meter, but when I set this in either the card setup or in the general setup of HA the values for the card are blank. Setting it to 0 meters or a positive value "solves" the issue.
An update handling negative elevation levels should solve this.

@dziban303
Copy link

Well I'll be damned. I'm in New Orleans, altitude -1m. Setting elevation: 0 fixed it. Thanks @bjkluft!

Hey @ThomDietrich, maybe we could put a mention of this negative elevation issue in the readme?

@ThomDietrich
Copy link

ThomDietrich commented Jan 30, 2024

@dziban303 thanks the confirmation! This sounds like a bug. It is great that we know the workaround now, but I am not sure what we would document in the README about it? Let's rather fix this!

Would anyone of you be willing to try working on a fix?

@dziban303
Copy link

I figured you were busy since this has been open for a while. Adding a caveat in the readme would be the least effort for now.

I don't know TS or JS, but this is notionally an easy thing to fix, so I tried some ifs to set elevation to 0 if it was a negative number—but nothing I did worked. Which isn't surprising because I have no idea what I'm doing.

@Koen010
Copy link

Koen010 commented Feb 18, 2024

I had the same problem - living in the Netherlands, default elevation =-1. Current release 1.0.0 can't handel negative elevation.
Luckily one can set the elevation specifically for this card. Any positive or 0-setting in the card yaml makes it work again like the charm it is.

@mirceadamian
Copy link

I hate posting the me too, yet I'm going to do it because I would like to bump this bug up a bit, as it seems that it was forgotten :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants