Sun
Built Configurable
Sunrise, sunset, golden hour, solar position, and day/night progress. Offline NOAA algorithm.
| Module type | sun |
|---|---|
| Default expression ID | sun |
| Refresh rate | Times once/day, position per tick |
| Required config | latitudelongitude |
Declaration
<module type="sun" id="sun" /> Properties
Reference any of these from a template via
{sun:propertyName}.
| Name | Description | Example | Format arg |
|---|---|---|---|
sunrise | Sunrise time | 06:15 | Yes |
sunset | Sunset time | 20:45 | Yes |
daylight | Total daylight duration | 14h 30m | — |
goldenHourStart | Golden hour start time | 19:50 | Yes |
goldenHourEnd | Golden hour end time | 20:45 | Yes |
solarNoon | Solar noon time | 13:30 | Yes |
elevation | Sun elevation in degrees | 45 | — |
azimuth | Sun azimuth in degrees | 180 | — |
isDaytime | Whether the sun is above the horizon | true | — |
dayProgress | Progress through daylight (0-100) | 65 | — |
nightProgress | Progress through night (0-100) | 0 | — |
riseGlyph | Sunrise icon font glyph | | — |
setGlyph | Sunset icon font glyph | | — |
bodyGlyph | Sun/moon glyph based on time | | — |
Events
| Trigger | Description |
|---|---|
| On sunrise | Sun crosses above the horizon |
| On sunset | Sun crosses below the horizon |
| On golden hour | Golden hour begins |