Sunrise

The Sunrise trigger fires the moment the sun rises above the horizon at your location. Home Assistant calculates the exact time for every day of the year from your home location, so the trigger stays accurate as sunrise shifts through the seasons.

Use it to open blinds, turn off outdoor or night lighting, or start your morning routine the moment the day begins.

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 Sun: Sunrise.
  5. Select Save.

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.sunrise. It has no 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.sunrise

This fires every day, the moment the sun rises above the horizon.

Good to know

  • This trigger does not use a target. It applies to the sun at your configured home location.
  • The trigger fires exactly at sunrise. To fire a fixed amount of time before or after sunrise, use the classic sun trigger, which accepts an offset. For light-based timing that adapts to the seasons, use Sun elevation crossed threshold instead.
  • To react to the first light before sunrise, use Dawn. To react when the sun goes down, use Sunset.

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. To test it, wait for the next sunrise, or temporarily switch to a trigger you can control while you build the rest of the automation.

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: open the living room blinds at sunrise

When the sun rises, open the living room blinds so the room fills with daylight.

  • Trigger: Sunrise
  • Action: Open cover
    • Target: Living room blinds
YAML example for opening blinds at sunrise
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Open living room blinds at sunrise"
triggers:
  - trigger: sun.sunrise
actions:
  - action: cover.open_cover
    target:
      entity_id: cover.living_room_blinds

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:

  • Sunset: Triggers when the sun sets.

  • Dawn: Triggers at dawn, when civil, nautical, or astronomical twilight begins.

  • Sun elevation crossed threshold: Triggers when the sun’s elevation crosses a threshold you set.