Home Assistant Lovelace card to present current sun elevation. Requires sensors providing UTC time and sun elevation at least to work properly.
It provides visual information about current sun elevation throughout the day, time of sunrise/sunset/noon, daylight duration and time to sunset. Available data depends on used Sun component: pre-existing one from Home Assistant (Basic), extended available here (Extended) or leverage Sun2 extension available here. Additionally it can depict current moon phase using sensor.moon
from moon
platform.
[![GitHub Release][releases-shield]][releases]
![License MIT][license-shield]
![Community Forum][forum-shield]
Used Sun component | Current sun elevation | Sunrise | Sunset | Noon | Daylight duration | Time to sunset |
---|---|---|---|---|---|---|
Basic | ☀️ | Only future | Only future | 🌑 | 🌑 | ☀️ |
Extended | ☀️ | ☀️ | ☀️ | 🌑 | ☀️ | ☀️ |
Sun2 | ☀️ | ☀️ | ☀️ | ☀️ | ☀️ | ☀️ |
You have to have mentioned
monitored_conditions
enabled in component:
- for
Extended sun
component:elevation
,max_elevation
,sunrise
,sunset
- for
Sun2
component:sunrise
,sunset
,solar_noon
,max_elevation
The card depicts current moon phase if you have defined moon_phase
entry in card configuration.
From version 4.x, the card accepts entities from "sensor" domain for given capabilities. See "Options" for detailed instructions.
Card options:
Name | Type | Requirement | Default value | Description |
---|---|---|---|---|
type | string | Required | custom:sun-card |
Type of card, non-modifiable |
name | string | Optional | Language specific | Card name visible in header, no header when empty value |
meridiem | boolean | Optional | Language specific | Clock format: 12h or 24h |
entities | Object | Optional | - | Allows defining entities providing required data |
Entities options:
Name | Default entity | Entity state type | Description of entity state value |
---|---|---|---|
time | sensor.utc_time | string in format hh:mm | current UTC time |
elevation | sun.sun | number | current sun elevation |
max_elevation | - | number | maximum elevation today |
sunrise | - | time (string) | today's sunrise time |
sunset | - | time (string) | today's sunset time |
noon | - | time (string) | today's noon time |
moon | - | string | moon phase (refer to moon sensor for possible values) |
Check out the README file in repository for templating possibilities.