Invert status of a Cover

Hi all,

I’m using the https://github.com/iMicknl/ha-tahoma/ integration to manage my Pergola via HomeAsisstant. It consists in two vertical sun covers and one pergola roof. Without going into details (added details into an issue there https://github.com/iMicknl/ha-tahoma/issues/577 see my user comments) I’ve a problem that the integration shows the device inverted. In details this is what happens:

Real Status: Open
HA Status: Closed
Device name, in example: cover.tenda_piccola_pergol
Real Status in percent if I set it to 90%: it should it open at 90%, but it close the device to 90%. This, compared to a working rolle shutter cover which works correctly (another integration).
The Opening and Closing state (during move) is not implemented, no problem.
The Icon is as well wrong, because it shows a arrow-collapse-horizontal and arrow-expand-horizontal but should use arrow-expand/collapse-vertical
History should reflect then the real status as well.

How to solve it? I think I shoud use the cover template but have no experience.

Thanks, Simon

Hello, about the icon, it’s done via customize. What about the rest? Any help?

Thanks!

Simon

Hello again, no help at all? :slight_smile:
I would like to test something, but what I’m in doubt is (how all it works first…), if my cover.tenda_piccola_pergol has wrong status (open instead closed or 90% instead of 10%), using a template cover would i create a new cover (i.e. cover.working_vertical_blind) that will have the status based on what I calculate over cover.tenda_piccola_pergol or would the template force different values to existing cover.tenda_piccola_pergol ?
Thanks, Simon

Hi to all, solved by myself in that way using template cover:

- platform: template
  covers:
    pergola_tenda_piccola:
      friendly_name: Pergola Tenda Piccola
      position_template: "{{ 100 - (state_attr('cover.tenda_piccola_pergol', 'current_position') | int) }}"
      open_cover:
        service: cover.close_cover
        data:
          entity_id: cover.tenda_piccola_pergol
      close_cover:
        service: cover.open_cover
        data:
          entity_id: cover.tenda_piccola_pergol
      stop_cover:
        service: cover.stop_cover
        data:
          entity_id: cover.tenda_piccola_pergol
      set_cover_position:
        service: cover.set_cover_position
        data:
          entity_id: cover.tenda_piccola_pergol
          position: "{{ 100 - (position) }}"

Hope that helps someone other :wink:

Cheers, Simon

6 Likes

It sure did help! Tnx!

Hi @Jan_the_Man ! Happy that helped :wink:

Cheers, Simon

Hi, helped me as well, at least half way :slight_smile:
The icon color and the slider are correct. But the arrow buttons are wrong. arrow up closes the blind and arrow down opens the blind. You know how i can invert the arrow buttons?
Thanks.

1 Like

Maybe customization it? But not really sure, sorry.
Simon

Hi thanks for help, I was running in the same issue.

One more question: did you find a nice lovelace card to represent the pergola and the vertical blinds?

Hello, actuqally not, I’m simple changed the icon, thats it :slight_smile: If you found it, please share it here as well :wink:

image

Bye, Simon

Hi there,

Just had an awning hung up today and while adding it to HA noticed too that the direction is inverted. While I understand the template idea and workaround has anyone tried changing the source of the problem? For example by using this method?

Hello!!
I didn’t know that approach, which seems very interesting :slight_smile: I could give that a try.
The only thing I think could be a problem is that in fact on my Tasmota Bridge the cover moves the right way controlling it from the Phone App.
I suppose that this could be a problem.
Ah, forgot… In addiction the manual controller shown in your video is working correctly as well. So in my case the problem is that the HA integration works reverted compared to the controller and the app.
Cheers, Simon

Yep same here. It is correct in my app as well. Nevertheless I prefer HA to be in control as it provides local control and automations will be based on it.

I won’t be messing with it just yet but I can imagine that I will over the next few months.

The store just informed me I would have to do a factory reset of the motor so I’ll need some time figure that out.

Okay, let us know your tests, that could be very helpful for me as well :wink:
Have a nice day!
Simon

Hi All,

For the moment I have not had time to look at resetting my Somfy App and changing the open close position that way.

I decided to go with the template for now and simply copied it to the developer tools template tester/designer. After changing my entities to the one that I use the tester comes back with:

UndefinedError: ‘position’ is undefined

any ideas on what I might be missing?

thanks in advance.

Edit:
Don’t know why and how but everything seems to be working now. And very well I might add. So I’ll leave it like this as it will have the correct position in the native app as well as in HA.

Thanks so much for this template example.

Hi, were you able to eventually solve it?

I would like to keep the cover and slider like it is, just inverting the arrow buttons (up to down and down to up) without affecting the underlying commands.

Sir, you saved my day, thank you very much!
I just want to add that this needs to be under ‘cover:’ in configuration.yaml.

Happy to have helped you :wink:
Cheers, Simon

1 Like

Hi,

is there any way to invert just the percentage?

thank you in advance