(deprecated) Shutter control with brightness sensor and room resident

Hello all,

I would like to share with you my current Blueprint for shutters.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The Blueprint takes into account:

  • the shutter itself :wink: (input: blind)
  • a door or window sensor (input: window_sensor) optional
  • the ventilation position when a window is opened (input: ventilate_position) optional
  • the distinction between door and window (input: door)
  • a brightness sensor (input: brightness_sensor)
  • brightness for opening (input: brightness_up)
  • brightness for closing (input: brightness_down)
  • an resident of the room (input: resident) optionally
  • a workday sensor (input: workday_sensor)
  • different time for opening for workday and non-workday (input: time_up_early and time_up_early_non_workday)
  • earliest and latest time for open and close aka time window

I intentionally do NOT use a calculated sun position, but simply the real brightness provided by a sensor.

What does this mean?

Basically the shutter closes when within time_down_early and time_down_late the brightness falls below the defined value of brightness_down. At the latest when time_down_late is reached, the shutter is lowered.

In the morning it is a little different. There as well the shutter is basically opened if within time_up_early or time_up_early_non_workday and time_up_late the brightness rises above brightness_up.
BUT: if a resident is defined, then the shutter does not go up as long as the corresponding input_boolean is TRUE. This is also true beyond time_up_late. In that case the shutter will be opened as soon as resident changes to false again.

With the window_sensor you can define that the shutter opens automatically when you open the corresponding window (or door). Then the position of ventilate_position is used.
This applies both if the shutter is already closed, but also if the shutter is closing automatically. Exception: if door is set, then ventilate_position is NOT driven to when the shutter closes automatically, but the closing is ignored for the time being - lockout protection.

With adv_blind you can set an additional switch (input_boolean). If this is true, the shutter will not be closed automatically in the evening. This is used by myself e.g. for the christmas time to “show” the illuminated windows in the evening. The automatic closing will NOT be executed in that case. You have to take care of it yourself!

With auto_up and auto_down you can switch off the automatic opening and closing.

I hope it works so far for you.
And maybe someone has an idea how to simplify the code.

(strongly inspired by AutoShuttersControl – FHEMWiki)

Gist: automatic_blinds.yaml · GitHub

2023-02-14: fixed an issue with booleans

2 Likes

Oh, two people with the same idea.
Thank you for your blueprint. Complex cover automations are very rare in HA.
I am currently developing a blueprint to fulfill my requirements from the FHEM module in Home Assistant.
I created the whole thing very generically, so that all kinds of blockers are possible.
Maybe I’ll get around to publishing my blueprint soon too.
I still have to proofread the descriptions.
So far it has been running very stably for a few weeks.

2 Likes

Good to see that there are other people trying to do complex things.

In spring I will have a look at the shading part :slight_smile:
But I guess this will become an additional blueprint, not integrated in this one.

Well, at least 9 people tried my blueprint.
Any feedback?

Found and fixed an issue with the booleans for door, auto_up and auto_down.

@Eimeel Class. That’s exactly what I was looking for. I will test it myself and report. Thanks in advance for making it available. What device do you use to determine if there is someone else in the room?

1 Like

What do you mean with “if there is someone else in the room”? Is it two people who are sleeping in the same room? I use an input_boolean “adults_sleeping” which is going to true if one adult is sleeping and changes to false if both adults are awake again. So I have input_booleans for every person in the house and some combined.

Sorry I expressed myself wrong. What device do you use to monitor the rooms to see if someone is in them.

Maybe I don’t quite understand what you’re trying to achieve.
For me it doesn’t matter for the shutters whether someone is in the room or not, does it? Because the shutters move automatically.
The only case in which it interests me is the morning opening in bedrooms. And for this I have an input_boolean per person, in which this is stored. It’s simply controlled by a switch that everyone has at their bedside. Basically the switch makes a toggle between awake and asleep.

I’m not actively tracking the room resident or if the corresponding room resident is inside the room. Cause I just want to know if currently someone is sleeping in the room or not.

Ah, now I understand. I thought you had a presence detector or something in the bedroom. But using the switch is also a good idea.

Hi @Herr.Vorragend - your code looks really promising. Have you achieved any further progress or have you planned to release it some day ?

@Herr.Vorragend

I housed your Blueprint from the linked Github, but it doesn’t work.
I am new to HA an have some Questions to the blueprint. Do you plan to release it some day?

Regards Christian.

Mine is working fine since months.
But in the future, I want to merge all cover blueprint ideas together into one blueprint. But I don’t know when I will have time for this.

Please show me your config. Maybe I can help you.

This blueprint is deprecated now.
Please see the (mostly) new one: Extensive roller shutter control including shading