Hi
I have a smart RF Controlled blind/curtain
That has 3 options
Open
Close
And pause
I use the Broadlink RM Pro
To control it
And it works fine
I’ve even got it working with HomeKit
Via setting every button as a script and putting those scripts as a curtain component in HA/thus it appears as curtain in HomeKit
The problem is though… that I have no percentage control over it
Like I can’t set it to close to 10% etc …
I’d like a way to do so
In HomeKit
Or even Node-RED (Alexa) like to say
Alexa set the curtains to 30%
I’v never had remote controlled blinds (yet) but as i do with my fans to control them in alexa i use template lights in ha, their execution script don’t do anything in ha, their brightness state is proportional to the fan speed state.
So basically the light appears in alexa with name “masterbedroom fan”, then it gets called say to set it to 50%, then in node red i can catch the service call with the requested brightness, so then i pass the a call service to the fan entity in ha transforming the pct brightness into a similar speed.
My guess is that if you want to do this with blinds you will have to time the closing and opening times so you can have an estimate of how much time it takes to move the whole blind down. Just an idea
1 - Control the shades by percentage (Like Alex (a , set shades to 10%)
2 - I want the changing to be seemless , meaning that I don’t the shade reset every time it changes position (Like if it’s in 10% then I ask alexa to change it and it goes back to 0% then goes to the desired position
I want it to directly go from 10 to 20% for example.
Just use the template cover I have provided the link for. No need for node red. It just does what you asked for. The main difference is that there are two more parameters in the custom component one for opening time and one for closing time. With these two values you can set the covers to any percentage. The component calculates the time needed to get from one to another.
It is just a normal cover component where the position slider does actually work. I don’t have alexa enabled so I can’t guide on that aspect. But after configuring the cover it should be easy. Currently I use the cover in homekit and google assistant where both are able to set any percentage.
You add the file to: /home/pi/.homeassistant/custom_components/timedcover/cover.py
timedcover is the name i made up, you can change it to whatever you want.The only requirement is that it should be unique.
for the configuration.yaml you add this:
cover:
- platform: timedcover
covers:
study_right_cover:
friendly_name: 'Study Right Cover'
open_cover:
service: switch.turn_on
entity_id: switch.study_right_cover_on
close_cover:
service: switch.turn_off
entity_id: switch.study_right_cover_on
#I've set the switch so that the on position refers to up in the remote and the off position refers to down on remote
stop_cover:
service: switch.turn_on
entity_id: switch.study_right_cover_stop
opening_time: 45
closing_time: 45
tilt_optimistic: false #didn't manage to get rid of tilt which does not work.
For the cover I have a dooya motor which works on 433MHz, which I had configured from broadlink. You can assign any switch you want which turns the cover on, off and stop.
Also don’t forget that the percentage is handled by a timer. So if you set the position to %50 you should at least wait for 22.5 seconds until you give a second percentage command. Otherwise it will lose the synchronization. If you do lose the synchronization you can set the cover to the limits where the current position on the ui and the real cover will be same.
Ok I see. I think I’ll just stick with NodeRed. It pretty much does the same thing. I have a time for close and open defined and just run percentages of that.
I have a lot of other flows integrated into it, so makes more sense for me just to keep everything there. I have 3 different shades that I either operate independently or together and my flows are coordinated if you start changing from all to a single or visa versa. Wind monitoring and time of day etc.
had I known there was a custom component I would’ve probably gone that way initially.
Why not try and get it implemented natively?
If you look at my picture above you will see two green lines. One above representing steady wind and one below gusts. They turn red i too high. Alexa will give a warning if I lower the shades when its too windy and will give a warning if the wind picks up while the shades are down.
Edit: I worked it out. Just needed to add an init file
This has been working perfectly for me but since moving over to 0.92.2 it has stopped working. I assume this is related to the changes that have been made for integrations (creating_integration_file_structure).
Have you moved up to 0.92.2? I’m not familiar with programming let alone python and wouldn’t know where to start getting this working with the new integration stuff, any help would be appreciated.
I am on the same train. I moved back to 0.89.2 until someone comes out with a easy to follow explanation to sort this out. I think that someone is you Will give it a try when i find the time. Thank you.
Of course the hanging of HASS when a camera disconnects should also be fixed before i try. I think that should also be fixed in upcoming releases.