FreshlyBrewedCode / hacs-homee

a Home Assistant custom component to integrate the homee smart home platform
MIT License
17 stars 6 forks source link

Shutter status is not displayed correctly #20

Closed Lu6413 closed 1 year ago

Lu6413 commented 1 year ago

In cover.py the following line should be corrected: @property def is_closed(self): """Return the state of the cover.""" return True if self.attribute(AttributeType.POSITION) == 100 else False

FreshlyBrewedCode commented 1 year ago

There is no way for me to verify this. Do you have multiple devices where the state is displayed incorrectly? Or do you know if this attribute is documented anywhere?

Maybe @Stklingner could also confirm if this is an error that needs to be corrected (because he implemented the cover component). https://github.com/FreshlyBrewedCode/hacs-homee/blob/f639ec424cf59930b0a2cc84db8b8fff70e728ec/custom_components/homee/cover.py#L102-L105

Lu6413 commented 1 year ago

All my shutters have always shown the status 'opened' regardless of the position. I cannot provide concrete documentation. In the forums as well as in my position attribute the value range is between 0=open and 100=closed. The code lines @property def current_cover_position(self): """Return the cover's position""" return 100 - self.attribute(AttributeType.POSITION) and my customization confirms my assumption. This changes the status to closed as soon as the position 100 is reached.

FreshlyBrewedCode commented 1 year ago

Ok, thanks for the explanation. I will push a fix with your suggestion. If there are still problems in the future we can reopen this issue.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 2.0.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

Lu6413 commented 1 year ago

homee integration updated. Works - thank you

Stklingner commented 1 year ago

Sorry for the late reply guys, good job - I'll have a look as well (mine work fine but I use my own dev branch currently)