Blind Control Based on the Sun Sunrise, Sunset, and Tracking?

Hello Everyone,
I’m new to the Home Assistant environment but it’s been very interesting discovering this program. I currently have a Samsung Smartthings Hub V3 with a connected Lutron hub with serval lights and blinds. I have connected the Samsung Smartthings hub to the Home Assistant program, which allows me to see and control all the devices manually. I was thinking of taking the next step and try setting up my blinds to open and closed based on the sun’s position. Looking to open them at sunrise and then automatically adjusting them as the sun moves throughout the day. I have a West and East facing townhome, so an example of operation would Westside open at sunrise, all open during midday, the Westside close during sunset, and then all close at a chosen time at night. The blinds are the Serena roller shades, which are operated off of batteries, so I’m looking for minimal movement operations to save on batteries. Wondering if someone new of a current template I could use or if some could give me any tips or tricks on creating a such SEQ. I’m new with Home Assistant.

Thanks everyone.
Josh

This should actually go in #configuration:blueprints

THe only thing you can do is to wade thru the blueprints section and see if you can find an existing blueprint that does what you want.

If you can’t find one I recommend digging into the automation documentation on the HA website and try to work out one that does what you want. You can also look at the multitude of automations posted in the forums to try to get a feel for how automations are supposed to work. More recent ones are better to look at.

If you get stuck you can always come back to the forum (in a new thread) and ask for assistance. But you’ll need to at least try to get started on your own first.

1 Like

Can’t help you with a blueprint but I have an automation doing something like this based on azimuth of the sun component which I check every 5 minutes like this;

- alias: Close blinds based on azimut
  trigger:
    platform: time_pattern
    minutes: 5

  condition:
    condition: and
    conditions:
      - condition: template
        value_template: "{{ states.sun.sun.attributes.azimuth | int  < 280 }}"
      - condition: template
        value_template: "{{ states.sun.sun.attributes.azimuth | int  > 120 }}"

You can add several other conditions like weather, temperature, home/not home, etc.

1 Like

Thanks. I will start with this suggestion.

Hi,

Just doing dome research on this. There seems to be a quite a few solutions to this. Your code, is a bit simpler, and therefore, easier for me at least, to understand.

Is your code basically adjusting the blinds for both sunrise and sunset? What does the 5 minutes do?

I would like to setup something similar based on a few things:

  • only for sunset
  • based on azimuth
  • based on presence (being home)—I have set this up for another automation and use the state for that
  • based on my weather station sensor that has a lux sensor (already reporting to HA via an integration)

The last condition is for example, I don’t want the blinds adjusting if its not sunny AND it doesn’t have to depend on that actual value except if its above a certain value (its sunny or not sunny). I’ll have to figure out how azimuth corresponds to lux on a clear, sunny day, and maybe even a cloudy day, but basically this automation would be running between the times of after 3pm to about 9 pm…but that would depend on the season also. Heres a sunny day example in march (2 days ago), and how it changes as the sun moves. Perhaps this would allow me to intrduce a condition that if the lux is greater than X w/m2 for more than 30 seconds in the time of 4 to 9 pm, adjust the blinds/covers accordingly.

I’ll just have to figure how to make this according to a moving target (azimuth)