Skip to content

Commit

Permalink
return unknown state if none is known
Browse files Browse the repository at this point in the history
  • Loading branch information
gluap committed Dec 31, 2023
1 parent 82aa335 commit 9308026
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/duofern/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ def current_cover_position(self) -> int | None:
return self._state

@property
def is_closed(self) -> bool:
def is_closed(self) -> bool | None:
"""Return true if cover is close."""
if self._state is None:
return None
return self._state == 0

@property
Expand Down

0 comments on commit 9308026

Please sign in to comment.