Polar night ended

The Polar night ended trigger fires when the polar night period is over and the sun climbs back above the horizon around midday. The polar night is the part of the year at high latitudes when the sun stays below the horizon for a full 24 hours. Home Assistant calculates this for your home location.

Use it to switch back to your normal day-and-night setup. For example, re-enable automations that depend on sunrise, or send yourself a reminder that daylight is returning.

Using this trigger from the user interface

If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.

To use this trigger in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. From the search box, search for and select Polar night ended.
  5. Optionally, set an offset to fire before or after the polar night ends:
    • Under Offset, enter how far from the end of the polar night to fire, such as 1 day.
    • Under Offset type, select Before or After.
  6. Select Save.

Options in the UI

Offset

The length of time from the end of the polar night when the trigger fires, in days, hours, minutes, and seconds. By default there is no offset, so the trigger fires exactly when the polar night ends.

Offset type

Whether the offset applies before or after the polar night ends:

  • Before: fires the offset amount before the polar night ends. This is the default.
  • After: fires the offset amount after the polar night ends.

Using this trigger in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.

In YAML, refer to this trigger as sun.polar_night_ended. A basic example looks like this:

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: sun.polar_night_ended

This fires when the polar night period ends. To fire a fixed amount of time before or after it ends, add the offset and offset_type options:

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: sun.polar_night_ended
options:
  offset:
    days: 1
  offset_type: after

This fires one day after the polar night ends.

Options in YAML

offset time

The length of time from the end of the polar night when the trigger fires. Accepts a time period mapping in hours, minutes, seconds, and days. Also accepts a duration string in HH:MM:SS format. Combine it with offset_type to fire before or after the polar night ends.

offset_type string

Whether the offset applies before or after the polar night ends. Accepts before or after.

Good to know

  • This trigger does not use a target. It applies to the sun at your configured home location.
  • The polar night only happens at high latitudes, roughly above the polar circles. Elsewhere, this trigger never fires.
  • The polar night ends when the sun’s daily high point, at solar noon, rises above the horizon again for the first time. From then on, Sunrise and Sunset resume.
  • To react when the polar night period begins, use Polar night started.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more].

For this trigger, there is no target entity to change. Because the polar night happens at most once a year, test the automation by temporarily switching to a trigger you can control while you build the rest of it.

More examples

Real scenarios where this trigger fires in automations and scripts. Copy any example and adapt it to your setup.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: announce the end of the polar night

When the polar night period ends and the sun climbs above the horizon again, send a notification so you know daylight is returning.

  • Trigger: Polar night ended
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
YAML example for a polar night ended notification
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify when the polar night ends"
triggers:
  - trigger: sun.polar_night_ended
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      message: >
        The polar night is over. Daylight is returning.

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.

Related triggers

These triggers work well alongside this one: