dmircea
(Mircea Damian)
October 16, 2024, 6:09pm
1
Hi all,
Posting this to help other people that may look here for a solution when using the custom Lovelace Horizon Card (GitHub - rejuvenate/lovelace-horizon-card: Sun Card successor: Visualize the position of the Sun over the horizon. ).
I’ve been encountering this situation when the card contains no times for sunrise, sunset, dawn, dusk even though the sun integration works well and the values are good.
This is described and tracked in the following issue:
opened 08:22PM - 20 Nov 23 UTC
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:

The simple workaround is to set inside the card a positive (or zero) elevation.
- type: custom:horizon-card
title: Sun
elevation: 0
I hope this saves some time for people looking for this issue. Took me a while until I’ve started looking into all the open issues until I found the one above.