🏠 Home Assistant Roller Shutter Automation Suite


This guide offers a complete and robust automation suite to manage your roller shutters in Home Assistant. It includes:

  • 🌇 Automatically closing shutters at dusk when the sun elevation drops below 5°
  • 💡 Activating selected lights or automations based on presence of specific persons
  • ♻️ Ensuring the automation runs only once daily using an input_boolean helper
  • 📝 Logging shutter closing events to the system log for monitoring
  • ⏰ A reset automation that clears the daily execution flag at midnight
Ideal for: Anyone wanting reliable, presence-aware roller shutter control based on sunset timing in Home Assistant.

⚙️ Requirements

Before deploying this automation suite, make sure the following Home Assistant entities exist and are properly configured:

  • input_boolean.rolladen_runter_ausgefuehrt – Boolean helper to track if the roller shutter closing automation has run today to prevent repeated triggers
  • Roller shutter cover entities, e.g. cover.rolladen_kuche_shutter, cover.smart_roller_shutter_...
  • Person entities such as person.jimmybones, person.jessi, and person.philip for presence detection
  • Light or automation entities to activate when specific persons are home

🔧 Input Boolean Helper Definition

rolladen_runter_ausgefuehrt:
  name: "Rolläden runter ausgeführt"
  initial: off
  icon: mdi:window-shutter

🔔 Automation 1: Close Roller Shutters at Dusk (Once Daily)

This automation closes the roller shutters automatically once the sun elevation falls below 5°. If person.jimmybones or person.jessi are home, specific lights will be turned on. If person.philip is home, automation.philip_an will also be triggered. The automation runs only once per day, controlled via the input_boolean.rolladen_runter_ausgefuehrt helper.

alias: Close Roller Shutters at Dusk
description: >
  Closes roller shutters when the sun elevation drops below 5 degrees. If
  person.jimmybones or person.jessi are home, specific lights turn on.
  If person.philip is home, automation.philip_an is also activated.
  This automation runs only once per day.
trigger:
  - platform: numeric_state
    entity_id: sun.sun
    attribute: elevation
    below: 5
condition:
  - condition: state
    entity_id: input_boolean.rolladen_runter_ausgefuehrt
    state: 'off'
action:
  - service: cover.set_cover_position
    target:
      entity_id:
        - cover.rolladen_kuche_shutter
        - cover.smart_roller_shutter_250311751416812360803c4e7ae14fb3f_shutter
        - cover.smart_roller_shutter_250515326603782360801c4e7ae174b1c_shutter
        - cover.smart_roller_shutter_250515011661802360801c4e7ae174b1a_shutter
        - cover.smart_roller_shutter_250311628897722360803c4e7ae14fa9e_shutter
    data:
      position: 15
  - service: cover.set_cover_position
    target:
      entity_id:
        - cover.smart_roller_shutter_250311765993632360803c4e7ae14fa40_shutter
        - cover.smart_roller_shutter_250311081394932360803c4e7ae14fae0_shutter
        - cover.smart_roller_shutter_250515284844582360801c4e7ae174b23_shutter
    data:
      position: 20
  - choose:
      - conditions:
          - condition: or
            conditions:
              - condition: state
                entity_id: person.jimmybones
                state: home
              - condition: state
                entity_id: person.jessi
                state: home
        sequence:
          - service: homeassistant.turn_on
            target:
              entity_id:
                - automation.wohnzimmer_an
                - light.badezimmer_led_2
                - light.nachttisch_2
                - light.kuche_links_outlet
                - light.kueche_re_outlet
                - light.gbk_h613c_4427
      - conditions:
          - condition: state
            entity_id: person.philip
            state: home
        sequence:
          - service: homeassistant.turn_on
            target:
              entity_id: automation.philip_an
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.rolladen_runter_ausgefuehrt
  - service: system_log.write
    data:
      message: "Roller shutters closed at sun elevation {{ states('sun.sun') }} degrees."
      level: info
mode: single

♻️ Automation 2: Reset Daily Execution Flag at Midnight

This automation resets the input_boolean.rolladen_runter_ausgefuehrt daily at 00:00:01, allowing the roller shutter automation to run again the next day.

alias: Reset Roller Shutter Automation Flag
description: >
  Resets the input_boolean.rolladen_runter_ausgefuehrt daily at midnight to allow
  the roller shutter automation to run again the next day.
trigger:
  - platform: time
    at: "00:00:01"
action:
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.rolladen_runter_ausgefuehrt
mode: single

🔐 Notes & Best Practices

  • Create the input_boolean.rolladen_runter_ausgefuehrt helper in Home Assistant before deploying the automations.
  • Adjust the roller shutter and light/automation entity IDs to match your setup.
  • Tune the sun elevation threshold (below: 5) based on your location and preferences.
  • Ensure the reset automation runs reliably every day to avoid missing shutter closing events.