Skip to content

Commit

Permalink
Inverted cover position to match home assistant's definition
Browse files Browse the repository at this point in the history
  • Loading branch information
optiluca authored and gicamm committed Apr 13, 2023
1 parent d7abaa2 commit 89ab6ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/comelit/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def is_closing(self):

@property
def current_cover_position(self): # -> int | None:
return self._position
return 100 - self._position

def set_cover_position(self, position, **kwargs):
_LOGGER.debug(f"Trying to SET POSITION {position} cover {self.name}! _state={self._state}")
self._hub.cover_position(self._id, position)
self._hub.cover_position(self._id, 100 - position)

def open_cover(self, stopping=False, **kwargs):
_LOGGER.debug(f"Trying to OPEN cover {self.name}! _state={self._state}")
Expand Down

0 comments on commit 89ab6ec

Please sign in to comment.