Based on the error it looks like your cover entity had not a current_position at the time of triggering.
Would this logic work equally well for condos on higher floors, or would one need to take floor elevation into account as well? Thank you!
Yes, that works fine. You donāt have to take building height into account because the sunās rays are approximately parallel due to the large distance between the earth and sun.
Not only did I get an instant answer, but it also included a fantastic illustration ā thank you so much, I will give this solution a try
I set this up yesterday for three of my shades that are immersed in sunlight at different times of day, and I am amazed by how well it works! I still donāt understand all of the various settings I can tweak in the blueprint, but just using the basic settings it already works quite well. What complicates my setup a bit is that my shades are behind a balcony, and the balcony has a ceiling that protrudes outward by a couple of meters. Additionally, I have a tall building block the most intense midday sun, so technically some of my shades donāt need to be lowered in the middle of the day. Lastly, when itās overcast, the shades also donāt need to be lowered. Obviously these are edge cases that go beyond what this blueprint was meant to accomplish, and Iām just truly amazed that, and how well, it works!
With the additional conditions and actions you can automate these parameters. Or look at the adaptive cover integration which has even advancer modes and adds a sensor with the calculated position that in turn can be simply used in an automation.
Can you help out a noob ā¦ I added the adaptive cover integration through hacs. I can see all the code over there ā¦ now what ? How do I set my azimuth and use it to control the blinds ?
Hi. So I used the blueprint instead of the integration and got it working. Also taught myself some visual studio code and got the simulation running. I am very grateful for all the work here. I donāt think I understand the general principals here ā¦
I have southerly facing windows, a few hours after sunrise and the sun makes it impossible to work and I have to close the blind enough to get the glare out. Hence my search for your work !! NOTE: I have dual blinds, so the back set is a sunscreen and the front set are blackout. The blackout is what I am automating.
So the behavoir I am looking for is ā¦
at dawn, open all the blackout blinds and let in some light - open all the way 100%
As the sun starts hitting the panes of the glass, lower the blinds as needed to eliminate blinding sun - keep them as open as possible throughout the day
at dusk - close the blinds
So I would expect the blinds to be open, gradually close and open back up again. But the behavoir is opposite. The blinds open throughout the day more and more. Is this what everybody wants ?
That is actually what is expected. As the sun rises the angle becomes bigger (e.q. the angled side is much steeper). Therefore the blind doesnāt need to be as low as when the sun is close to the horizon and almost shines light in a direct horizontal line. You could check the OP for more in-depth explanations and the attached scientific research.
Been using this successfully for a few days on three of my roller shades. I tried to set up additional conditions so that the shades stay up when itās cloudy or rainy, but I realize that thereās a gap in my thinking: When the shades are already partially lowered because it was sunny before, and then it starts to rain, the automation will be kept from raising the shades again due to my extra condition (the shades are basically stuck at their previous position). Is there a known way to configure the blueprint to raise the shades when the weather deteriorates? Thank you
P.S.: Answering my own question, I suppose I could create a separate automation to raise the shades when itās rainy/cloudy.
Hey there, thanks for posting this. Itās exactly what Iām looking to do. Iām pretty new to HA and adding things to the YAML. If I want to include this in my automation, where in the YAML do I add it? Do I need to add any other sensors/helpers in HA? Thanks!
@basbrus
Hello,
If I manually change the position of a shutter, is there any way to adjust the delay before the automatic system takes over again?
Merci
Thank you @langestefan this is amazing and so much better than I was using before.
I was wondering if youāve ever thought about making a version for sliding curtains? If not is there any advice you would give in terms of trying to convert this to a sliding version? Iām guessing I would take two angles from north from the point of where to have no sun, left and right side of the window, distance from window, and height of windowā¦ and from there you could do left and right field of view and min elevationā¦
Hi, for curtains I think a binary sensor would be enough to indicate open/close. Since you cant really control the shade area anyway. I linked a template for that above in this thread somewhere.
At first I was thinking just open or close as wellā¦ But this morning I was watching the sun move across my monitors at my deskā¦ And I was thinkingā¦ There has to be a wayā¦ The roller shades fixed the same issue for the window next to the deskā¦
The first disclaimer is that I feel like it is only worth it if you have split curtainsā¦ Yes the same concept can be used with a simple left to right curtain but there would not be as much benefit in the automation over the switch you referencedā¦
Sorry about the poor quality images, but I think it helps explain the idea better. I would love your thoughts on improvements or if you think its a waste of timeā¦
The first part would be to get the Ar
and Al
azimuth left, azimuth right. These are taken from one edge of the desk to the opposite edge of the door or window. This should give you a range of when the sun would be coming directly though the window.
Using the distance from the window, as well as the height of the windowā¦ This would give you a range of solar elevation that the sun would come through the window.
From here you know that each half of the curtain would cover half of the azimuth range we have calculatedā¦ So if its under the half way point, we would close the left, over we would close the rightā¦ Then we can calculate the percentage of the azimuth range where the sun is for the half of the curtain we would be closing, add 5%? and close the curtains to that point.
Thank you for all the hard work on this! This is a great idea that I hope I can get working, Iāve wanted something like this for a while. I canāt really get mine working though.
My house is pretty easy, squared up perfectly. My window is such:
- Faces east (90 degrees)
- Is about 2M off the ground
- Is 1.5M tall
- My desk is about 1M from the window
Right now when I run this, the shade opens to my max (70%) but the sun is glaring right in, it should be sitting around 15-20% right now. Iām sure I have something incorrect but Iām not sure what it is:
alias: "Trigger: Set West Curtains Based on Sun Position - Office Shades"
description: ""
use_blueprint:
path: langestefan/auto_sun_blind.yaml
input:
cover_entity:
entity_id: cover.office_shade
azimuth: 90
max_height: 1.5
min_height: 0
default_height: 70
minimum_position: 0
condition_mode: and
distance: 2
change_threshold: 1
time_out: 1
condition:
- condition: state
entity_id: input_boolean.curtain_sun_automation_enabled_office
state: "on"
Settings look correct, although you could set the distance to 1 meter (distance means distance to the shaded area).
What is your rough location?
Denver, Colorado USA
Simulation for that location says this:
So at 8:00 the blind should be almost closed. Is that what you would expect?
Yes, but itās not what I got, the blinds opened all the way.