Cover improvement (request)

I have just installed a roller shutter controller, and I was surprised that Home Assistant does not allow me to calibrate the opening of the roller shutters correctly in intermediate positions.
I think it would be a great help for users to be able to calibrate the intermediate positions with a list of values. For example, when I want 50% real opening, the blind should be set to 72% in the integration.
It would also improve the usability a lot to be able to easily add buttons with those presents without having to do the programming by hand, in the same integration, as for example Shutter Row Card allows.
I hope you find these ideas interesting.
Thank you very much for your continuous work.

We had this discussion a year ago or so, and it wasn’t as staright forward, as it sounds. I can’t remember much about that discussion, but what I kept in mind was, it would be kind of difficult, as this would rely on the integrations of every specific manufacturer.

So it wouldn’t be a change in HA core, but rather in every integration, that works with covers.

I find it an interesting idea, but I think, it would need someone who is very familiar with covers in HA, to even get some information, on how this is handled internally and how to change that, without breaking all cover integrations.

Sorry, can’t remember much more about that discussion (and can’t seem to find it :frowning: ), but I’d say, this is a long shot…

Anyway, good luck with this!

Btw. this sounds like a feature request, should this be moved to feature requests? Or do you want a serious discussion first, before you write up a feature request?

I have no experience with covers, but it looks like you could abstract a real cover behind a template cover:

…with the mapping from “real” to “fake” opening in the position_template (read) and set_cover_position (write) templates.

1 Like

Thank you very much Patrick. I had simply thought of a scaling function that, given an input by the UI, generates the output that will go to the integration. From that point of view it doesn’t depend on the integration, as it would be an interface on top of it. I’ve put it here because I think it could be done at the interface level. Unfortunately I don’t have the knowledge to program anything myself, nor to give ideas at that level.
Regarding where to put the request, my intention was to make the feature request, but if it has already been discussed maybe it is interesting to clarify possibilities before making the request more formally. I don’t know, you guys are more used to these dynamics than I am, so I’m fine with whatever you decide.

Thank you Troon. I don’t see that it is possible to associate an input value with a different output value. Maybe I’m wrong, but in the examples I don’t see anything similar to the ones I’ve given.

Examples are not exhaustive: you need to be able to think more broadly than just what is presented to you. A bit of templating will get you what you need.

set_cover_position: "{{ sqrt(position / 100) * 100 }}"

will give a range from 0 to 100, where 50% becomes about 71%. You’ll have to reverse that function in the position_template, and replicate all the other open / close functions.

If you give more details like the mapping you want to use and the entity_id of your cover plus all its attributes, I’ll even have a go at writing it for you.

1 Like

Interesting. Thank you very much, I’ll spend some time to see if it’s what I’m looking for, but it looks like it.

I didn’t know that one, looks great! :slight_smile:

Thanks for the tip! :+1: