Adaptive roller blinds

Adaptive roller blinds

One of my favorite automations is an automated adjustment to my roller blinds. As my desk faces a south-facing window I am hit by a solar beam in the winter months when the sun doesn't rise very high in the sky. Initially, I setup an automation that adjusted my roller blind based on the angle and the height of the sun. It uses a great blueprint from the community (link at the bottom), and the automation looks like this:

alias: Adaptive cover for his office left roller blind
description: ""
  path: adaptive_cover/adaptive_cover.yaml
    adaptive_cover_entity: sensor.adaptive_cover_his_office_left_roller_blind
    change_threshold: 5
    time_out: 1
      - condition: state
        entity_id: binary_sensor.adaptive_cover_office_roller_blinds
        state: "on"
          hours: 0
          minutes: 1
          seconds: 0
      - condition: state
        entity_id: input_boolean.disable_blind_automations
        state: "off"
      - condition: state
        entity_id: person.dima
        state: home
      - condition: state
        entity_id: timer.pause_adaptive_blinds_his_office
        state: idle
    cover_entity: []

However, I quickly realized I didn't want this automation to work all the time. For example, it's nice to have the sun warm the house in the winter and to keep things brighter during months with late sunrises and early sunsets. After some back and forth, I came up with the following exceptions:

  • When I'm not home (such as working from the office downtown)
  • Cloudy days
  • Days with precipitation
  • Weekends when I'm rarely at my desk
  • During US holidays when I'm not working at my desk
  • Before sunrise or after sunset
  • Anytime I want to disable this automation for some other reason

I build a binary sensor sensor that determines whether adaptive blinds run. It's true when the blinds should adjust, and false when they shouldn't. Template that binary sensor configuration looks like this:

{{ (
      states('sensor.pirateweather_cloud_coverage') | float < 80.0
      and states('calendar.us_holidays') | float > 0
      and states('binary_sensor.workday_sensor') == 'on'
      and states('sensor.openweathermap_precipitation_kind') == 'None'
      and states('sensor.sun_solar_elevation') | float > 0.5
      and states('input_boolean.disable_blind_automations') == 'off'

Also, I have buttons at my desk that allow me to adjust the shade up and down. In those scenarios, I don't want the automation to take over and negate my manual adjustments. When those buttons are pressed, I have this automation disabled and re-activated at midnight.

You can import this blueprint in your HA instance with one easy click: Import blueprint to HA