About
Sun2 is a custom integration that creates sensors for sun-related events at one or more locations. It adds sensors for events such as dawn, dusk, daylight, night, azimuth and elevation, plus binary sensors that switch on when the sun's elevation is above a chosen threshold. Each location has its own latitude, longitude and time zone, and defaults to the Home Assistant location if none is given. Observer elevation can be set above ground level, or an obstruction such as a mountain can be described for the sunrise side, the sunset side, or both. Actions can reload the YAML configuration, read a location's options and update them. It runs locally and is set up through the UI or YAML, after being added as a custom repository.
Automatic summary of the README and code of pnbruckner/ha-sun2. Something wrong, or are you the maintainer and want your own text here? Get in touch
Supports
Works locally Talks to your devices on your own network. No vendor cloud in between.
From the Marketplace Installed through the Marketplace, formerly HACS.
Provides
- Sensors
Setting it up
Add its repository to the Marketplace as a custom repository and install it, then restart Home Assistant and add it under Settings, Devices and services.
Elevation at Time Sensor Options
- input_datetime entity ID
- Name
Elevation at Time Sensor Options
- Time
- Name
Elevation Binary Sensor Options
- Use horizon as elevation
Elevation Binary Sensor Options
- Elevation
- Name
Location Options
- Location
- Time zoneSee the "TZ identifier" column at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.
Location Name
- Name
Observer Elevation
- Sunrise & dawn are affected by an obstruction
- Sunset & dusk are affected by an obstruction
Observer Elevation Values
- ElevationYour elevation above GROUND level (not SEA level).
- Distance to sunrise obstruction
- Relative height of sunrise obstructionHeight relative to yourself, which may be negative if obstruction is below you.
- Distance to sunset obstruction
- Relative height of sunset obstructionHeight relative to yourself, which may be negative if obstruction is below you.
After setup
- input_datetime entity ID
- Name
- Time
- Name
- Use horizon as elevation
- Elevation
- Name
- Location
- Time zoneSee the "TZ identifier" column at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.
- Sunrise & dawn are affected by an obstruction
- Sunset & dusk are affected by an obstruction
- ElevationYour elevation above GROUND level (not SEA level).
- Distance to sunrise obstruction
- Relative height of sunrise obstructionHeight relative to yourself, which may be negative if obstruction is below you.
- Distance to sunset obstruction
- Relative height of sunset obstructionHeight relative to yourself, which may be negative if obstruction is below you.
- Select entities to remove
Texts from the code of pnbruckner/ha-sun2.
Entities
- SensorsAstronomical daylight, Astronomical dawn, Astronomical dusk, Astronomical night, Azimuth, Civil daylight, Civil night, Daylight, Dawn, deCONZ daylight, Dusk, Elevation, and 14 more
Actions
- Get locationGet location options.Fields: Location
- ReloadReloads Sun2 from the YAML-configuration.
- Update locationUpdate location options. NOTE: If any of Latitude, Longitude & Time zone are specified, they must all be specified.Fields: Location, Latitude, Longitude, Time zone, Observer elevation
From the README
Creates sensors that provide information about various sun related events.
Follow the installation instructions below. Then add one or more locations with desired sensors either via YAML, the UI or both.
Shows in Vulpo
Chart card, Apple Watch.Information
- Installs
- 1.5k sharing analytics
- GitHub stars
- 309
- Connection
- Works locally
- Upkeep
- No update in 6 to 18 months
- Version
- 3.4.3,
- Category
- Sensors
- Kind
- Marketplace integration
- Needs
- Added as a custom repository in the Marketplace
- Domain
sun2- Issues
- Report an issue











