WHY THE HECK can't we freely configure a Cover to interpret its percentage value as "percentage open" or "percentage closed"?

Once again thank you Marius!!!

I took your idea one step further and actually renamed my existing 5 entitity_id’s with _hidden and created templated ones with the original entity_id. My templates look like this:

      kitchen_blind_2:
        friendly_name: Kitchen 2
        value_template: >
            {%- if state_attr('cover.kitchen_blind_2_hidden','current_position')|int > 98 %}closed
            {% else %}open{% endif %}
        position_template: >
          {{100 - (state_attr('cover.kitchen_blind_2_hidden','current_position')|int)}}
        set_cover_position:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.kitchen_blind_2_hidden
            position: >
              {{100 - position}}
        open_cover:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.kitchen_blind_2_hidden
            position: >
              {{states("input_number.kitchen_blind_2")}}
        close_cover:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.kitchen_blind_2_hidden
            position: 99

I have routines in Node Red which monitor the input_number presets for the open position which will call set_cover_postion with the new input_number value so they automatically adjust to the new desired position. The same could of course be done with automations…

1 Like

Sorry for the newb question but can you please tell me which file to modify and how to enter this code?
My buttons in the shutter are working the opposite and it drives me crazy as well.
Thanks :pray:t2:

14 months later. Any movement on this? Who do I have to bribe?

I have outside venetian blinds on every window. Their function, just like curtains is to stop light when they are closed. So closed = 100% (of light stopped)

It is a lot of work to get this to function properly.
Install File editor and add this to configuration.yaml and add this for an inverted slider - Yes one for each blind on your house!! Code from Marius several posts above^^

#https://www.home-assistant.io/integrations/cover.template/
cover:
  - platform: template
    covers:
      christina_blind_inverted:
        friendly_name: Christina blind inverted
##        device_class: shade
        position_template: >
          {{100 - (state_attr('cover.blind_2','current_position')|int)}}
        set_cover_position:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.blind_2
            position: >
              {{100 - position}}

Add a new empty card in lovelace

type: entities
entities:
  - entity: cover.blind_2
    name: Christina's cool blinds
    tap_action:
      action: none
    icon: mdi:blinds
  - entity: cover.christina_blind_inverted
    type: custom:slider-entity-row
    full_row: true
    hide_state: true

Looks real nice and the navigation to the incorrect slider is disabled too.

image

1 Like

I 100% agree it must be configurable. (100% meaning fully configurable :crazy_face: ). Crucial for the WAF, and templates won’t do. Buttons will look inverted and voice integrations will also be messed up. I’ve templated over 10 covers for other reasons and it is a pain.

To the industrialists who say the default should be safe I do want to state that this is a bad argument for the value of the percentage.

First of all: e.g. an awning is not safe when expanded: the wind will destoy it. And I have rollerblinds in front of inward turning windows. They must never go down when the window is open. But for a garage door, things are different.

But more importantly: Systems can be made safe without the usability suffering. A terrible accident happened in the Netherlands because a motorized vehicle did not brake by default when a cable snapped. That does not mean that 0% brake is full brake, or that you should constantly press the brake to be able to ride. Even more so in software, how a system is engineered safely should not dictate how it is used. Users are usually not engineers and the UI should be loosely coupled to the inner workings.

Also metaphores are broken. If you call something a cover, then 100% should mean fully covered. If you call it a blind, then 100% should be fully bllinded. I’m Dutch, but I’d like someone English to explain what is the flaw in that logic.

If you want it to work differently, then call it differently. My HA is rife with remote controlled dimmers. But we all call them light in HA because that is how we perceive it. Had we all called them dimmers, 100% dimmed would mean lights off. Go explain that to your wife :crazy_face:

And to the lighting enthousiasts: I buy my blinds to make it dark, so I can sleep. So I’m not letting the light in - that is what windows are for. I’m trying to keep light out. I guess I’m a Glass Half Empty kind of guy. :grinning:

6 Likes

So, if we all agree it should be configurable, is there any timeline for adding this feature? Personally, I can’t wait :wink:

I’ve just created a topic for this in the feature requests. Please vote to let this happen!

I found two solutions which works fine for me:

1.)
image

2.)
image

It acts like i want. If i close the cover (slide to the right 100%). Status is “geschlossen (closed)” and the wert (value) is 100%.

I will post the steps which are needed asap.

I’m curious how you did that! Didn’t find a good solution myself.

Hi delcara. Here my solution:
First of all thanks to Marius.

You can use any kind of technology. I use KNX.

1.) KNX configuration

knx:
  - name: "Jalousie sofa"
    stop_address: "1/3/52"
    position_address: "1/3/53"
    position_state_address: "1/7/57"
    angle_address: "1/3/55"
    angle_state_address: "1/7/58"
    invert_position: false 
    invert_angle: true
    travelling_time_down: 38
    travelling_time_up: 38

this creates cover.jalousie_sofa

2.) Create a cover inverted helper object. This helper is needed to define that 0 is open and 100 is closed.

cover:
  - platform: template
    covers:
      jalousie_sofa_inverted:
        friendly_name: Jalousie sofa inverted
        position_template: >
          {{100 - (state_attr('cover.jalousie_sofa','current_position')|int)}}
        set_cover_position:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.jalousie_sofa
            position: >
              {{100 - position}}

3.) Now create a card and put all together:

# That is the information card
  - entity: cover.jalousie_sofa # Here i use the KNX object with attribute current_tilt position (Winkel)
	attribute: current_tilt_position
	type: custom:multiple-entity-row
	state_header: Winkel
	unit: '%'
	name: Jalousie Sofa
	icon: mdi:information-outline
	tap_action: # -> i don't want a tap action!
	  action: none
	entities:
	  - entity: cover.jalousie_sofa # Use the KNX Object for status purpose (Open->closing->closed)
		name: Status
	  - entity: cover.jalousie_sofa_inverted # Here i use the inverted helper for the current_position of my cover.
		name: Auf/Ab
		unit: '%'
		attribute: current_position

# That's the KNX Object		
  - entity: cover.jalousie_sofa
	name: Komplett Auf/Ab
	icon: mdi:window-shutter

# That's the slider (inverted) for steering the position	
  - type: custom:slider-entity-row
	entity: cover.jalousie_sofa_inverted
	attribute: position
	full_row: false
	hide_state: true
	icon: mdi:window-shutter
	name: Schrittweise

# That's the KNX object for steering the tilt positon of the cover	
  - type: custom:slider-entity-row
	entity: cover.jalousie_sofa
	icon: mdi:angle-acute
	attribute: tilt
	hide_state: true
	name: Winkel

That’s it. Now you get a good working cover steering :slight_smile: If you still have question, just ask :slight_smile:

Here some gifs:

10-04-2022_14-33-28

10-04-2022_14-36-17

3 Likes

Here’s a question: How does it behave when triggered from other integrations like Alexa or HomeKit through HA? When you call “Cover to 25%” or “Close Cover”?

sorry that i have not yet tested. I will try this asap

1 Like

And even though it is doable with templating - I have 20 cover entities and that is no fun to do 20 times over. Besides the fact that I then have 40, half of which behave opposite to the others.

I understand you. I just showed one possible solution, how it can be implemented at the moment. I would also prefer a better method.

1 Like

Maybe you can do this in a blueprint.
You can for sure hide the unused (non-inverted) entities (since 2022.4).

1 Like

Hi Matthias,
i successfully tested alexa with a cover. If i say “alex set cover xyz to 80” ( DG Rollladen Studio rechts
cover.rollladen_dg_studio_rechts home assistant) the cover will close to 80%. I used the inverted entity. :slight_smile:
I am pretty sure it is also working with home kit and google home

BR Branimir

1 Like

And if you say “close cover” or “open cover”? Afaik some translate this internally to a percent value instead of calling async_clise_cover() - and I would guess it wouldn’t know of inverted positions :thinking:

Perhaps this works:

create a cover that does nothing. After that create a routine that close the cover to xx%
Then create an automation with the trigger close cover and condition close cover to xx%
?

Edit: Ok i found a solution with node red that actually works with alexa. Working commands are
Alexa set xx to yy %
Alexa close xx
Alexa open xx

The service i call is my inverted cover helper “cover.dg_rollladen_inverted”

I used this plugin node-red-contrib-virtual-smart-home (node) - Node-RED
Now i would like to test the plugin node-red-contrib-amazon-echo

Thnx Brainjay! I use z-wave and somfy RTS for my covers. I’m going to try this solution. But as you said, a built-in solution would be easier. I have only 4 covers were I need to have them inverted. But it’s a lot of code and hassle if you have a lot more covers. So still voting for my feature request :slight_smile:

1 Like

Thanks so much, I inverted my Luxaflex Duette Top Down cover and now the arrows perfectly represent which way the Duette should be going :slight_smile:

1 Like

iBlinds (Z-Wave) v3 have that now in their newer motor’s firmware…