Back to the overview

Sun in Home Assistant

sun part of Home Assistant since pre 0.7

Calculated Set up in the user interface Quality: Internal

The Sun integration connects Home Assistant with sunlight data, providing sensors for sunrise, sunset, and daylight duration. It calculates this information based on location and time.

Typical uses

  • Automate lighting based on daylight
  • Adjust thermostat settings with sunrise/sunset
  • Trigger scenes at specific times of day
  • Monitor solar energy production potential

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
564,907 (78.8 % of the installations that share statistics)
Categories
Environment
Provides
Binary sensor, Sensor
Maintained by
@home-assistant/core

Setup

  1. In Home Assistant open Settings → Devices & services.
  2. Click "Add integration" and search for Sun.
  3. Follow the dialog – it asks for everything the integration needs.

Add to my Home Assistant

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 – Configures NSPanel devices with ESPhome, using weather and sensor data to trigger light notifications and controls. ♥ 626 · Import · Forum
  • Automation ZEN32 and ZEN35 Scene and State (Z-Wave JS)(v2026.9.5) – Manages ZEN32/35 scenes and states with Z-Wave JS, using multiple entities and logbook calls. ♥ 37 · Import · Forum

All blueprints for it

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. since August 4, 2026 · 0 reactions · 11 comments · #178176
  • open The sun's current activity time conflicts with the time of its next rising. since October 23, 2025 · 0 reactions · 9 comments · #155049
  • open There is an unexpected delay between twilight ending and sunrise beginning. since September 8, 2026 · 0 reactions · 1 comment · #181617

Fixed

  • fixed in 2026.7.0 Sunrise and sunset conditions now use accurate event times instead of estimates. Fix #175240 · Issue #175157
  • fixed in 2026.7.0 A previous error that occurred when checking sun status has been resolved. Fix #174811

Source: the issue tracker of Home Assistant, as of October 25, 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.

Scroll to Top