Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion homeassistant/components/zwave_me/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,23 @@ def current_cover_position(self) -> int | None:
"""Return current position of cover.

None is unknown, 0 is closed, 100 is fully open.

Allow small calibration errors (some devices after a long time become not well calibrated)
"""
if self.device.level == 99: # Scale max value
if self.device.level > 95:
return 100

return self.device.level

@property
def is_closed(self) -> bool | None:
"""Return true if cover is closed.

None is unknown.

Allow small calibration errors (some devices after a long time become not well calibrated)
"""
if self.device.level is None:
return None

return self.device.level < 5