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

Fixed cover position handling #77

Merged
merged 7 commits into from
May 6, 2024
6 changes: 3 additions & 3 deletions custom_components/comelit/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def is_closing(self):

@property
def current_cover_position(self): # -> int | None:
if self._position: # if not None:
return 100 - self._position
if self._position is None:
return None
else:
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}")
Expand Down
Loading