Sun in Home Assistant
sun
part of Home Assistant since pre 0.7
The Sun integration connects Home Assistant to calculated data about the sun's position and daylight conditions. It is used to track sunrise and sunset times, adjust lighting based on natural light, and automate blinds or shading systems.
Typical uses
- Sunrise/sunset tracking
- Lighting automation
- Blind control
- Energy management
Facts about this integration
- Compatible with Home Assistant
- yes, official integration
- Connection
- Calculated – Works on data Home Assistant already has, without a device of its own.
- Setup
- in the user interface
- Kind
- Online service
- Quality scale
- Internal – Part of Home Assistant itself, not rated separately.
- Installations
- 540,102 (79.0 % of the installations that share statistics)
- Categories
- Environment
- Provides
- Binary sensor, Sensor
- Maintained by
- @home-assistant/core
Setup
- In Home Assistant open Settings → Devices & services.
- Click "Add integration" and search for Sun.
- Follow the dialog – it asks for everything the integration needs.
The link goes through my.home-assistant.io and opens the setup dialog in your own instance – no address of ours is involved.
Blueprints that use this integration
- Automation NSPanel Configuration
- Automation ZEN32 and ZEN35 Scene and State (Z-Wave JS)(v2026.9.0)
Known issues and fixes
3 open issues and 4 bug fixes in the last twelve months are recorded for Sun in the Home Assistant issue tracker. If something does not work, update first: the most recent fix shipped with Home Assistant 2026.7.0.
Open
- open The sun's friendly name is not displayed in the user's preferred language.
- open The sun's current activity time conflicts with the time of its next rising.
- open There is an unexpected delay between twilight ending and sunrise beginning.
Fixed
- fixed in 2026.7.0 Sunrise and sunset conditions now use accurate event times instead of estimates.
- fixed in 2026.7.0 A previous error that occurred when checking sun status has been resolved.
Source: the issue tracker of Home Assistant, as of September 13, 2026. The sentences are written by a language model from the titles of the issues; the reports themselves are on GitHub.
Check a specific device for known problems in the product check →
Source of this entry: the official documentation of the integration
The description was written by a language model from the facts listed here, not taken from the documentation.
