Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overkiz "AwningValance" open/close is reversed #94952

Closed
quodo opened this issue Jun 21, 2023 · 4 comments
Closed

Overkiz "AwningValance" open/close is reversed #94952

quodo opened this issue Jun 21, 2023 · 4 comments
Assignees

Comments

@quodo
Copy link

quodo commented Jun 21, 2023

The problem

We have “exterior vertical shades/blinds” with Somfy motors (I had to look up the english terms) and two of them, type “AwningValance”, have open and closed reversed in Home Assistant.

Home Assistant found them automatically with the Overkiz integration. In the device information they are

PositionableScreen by Somfy, Connected via Connexoon, Firmware 5121525A07, Hardware: io:VerticalExteriorAwningIOComponent
AwningValance by Somfy, Connected via Connexoon, Firmware 5118126A10, Hardware: io:AwningValanceIOComponent

My issue is with the “AwningValance” shades. The control for “Open cover” closes it. However, when I click “Close cover” it opens and in the Logbook it says “… was opened triggered by service cover.close_cover”.

What version of Home Assistant Core has the issue?

core-2023.6.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Overkiz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/overkiz

Diagnostics information

home-assistant_overkiz_2023-06-21T07-15-25.601Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

The cover is open in this screenshot although the controls let you think it is closed:
HA cover 1 Device info cover
I created an Entities Card with position as secondary information. When both covers are open, the PositionalbeScreen shows a position of 100 and it shows correctly as open. The open AwningValance shows incorrectly as closed with a position of 0. See screenshot:
HA cover 3 Entities card with position
In the Android app “Tahoma” by Somfy these shades work well. Open is open, and closed is closed, with correct positions. This lead me to believe the problem might be in the Home Assistant integration.

This exact question was posted here https://community.home-assistant.io/t/overkiz-api-and-somfy-api/61448/1969?u=mirjam and as replies suggested reported as an issue. Thank you.

@home-assistant
Copy link

Hey there @iMicknl, @vlebourl, @tetienne, @nyroDev, mind taking a look at this issue as it has been labeled with an integration (overkiz) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of overkiz can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign overkiz Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


overkiz documentation
overkiz source
(message by IssueLinks)

@tetienne
Copy link
Contributor

Hi, this is the expected behavior. Awnings expose deploy (map to open) and undeploy (map to close) commands. So depending of the orientation of your device close and open does not behave as you can expect.

I will recommend you to create a cover template so you can reverse the logic.

@tetienne
Copy link
Contributor

@home-assistant close

@quodo
Copy link
Author

quodo commented Jun 24, 2023

Thank you for your quick response and for pointing in the direction of the solution.

It took me some time to find and understand how to create a cover template and get the syntax right. On the community forum I also had the suggestion not to reverse open/close, but to invert the position. Although I don't really understand the implications of differences between the two right now I tried them both. With this code I have two working screen entities in my dashboard, next to the original one with the, for me, wrong orientation.

# Reverse open/close cover AwningValance, suggested by iMick (community) and tetienne (GitHub Overkiz)
# https://community.home-assistant.io/t/overkiz-api-and-somfy-api/61448/1971
# Example configuration.yaml entry on
#   https://www.home-assistant.io/integrations/cover.template/
cover:
  - platform: template
    covers:
      # The entity name
      screen_zw_voordeur_reversed:
        friendly_name: "Screen ZW voordeur reversed"
        # This gives the position integer, it is an attribute of the cover entity
        position_template: >
          {{100 - (state_attr('cover.screen_zw_voordeur','current_position')|int) }}
        # The entity state: open/opening/closed/closing
        value_template: "{{ states('cover.screen_zw_voordeur')}}"
        # Need to reverse "opening" and "closing"
        open_cover:
          service: cover.close_cover
          target:
            entity_id: cover.screen_zw_voordeur
        close_cover:
          service: cover.open_cover
          target:
            entity_id: cover.screen_zw_voordeur
        # I want a stop button
        stop_cover:
          service: cover.stop_cover
          target:
            entity_id: cover.screen_zw_voordeur  
      # Suggestion to invert the postion, by Mariusthvdb
      # https://community.home-assistant.io/t/overkiz-api-and-somfy-api/61448/1974
      screen_zw_voordeur_inverted:
        friendly_name: Screen ZW voordeur inverted
        position_template: >
          {{100 - (state_attr('cover.screen_zw_voordeur','current_position')|int) }}
        set_cover_position:
          service: cover.set_cover_position
          data:
            entity_id: cover.screen_zw_voordeur
            position: >
              {{100 - position}}
        stop_cover:
          service: cover.stop_cover
          target:
            entity_id: cover.screen_zw_voordeur

HA cover 5 - dashboard with three entities

@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants