Bugfix 3-5
This commit is contained in:
@@ -42,11 +42,21 @@ class SternwarteRoofCover(SternwarteEntity, CoverEntity):
|
||||
|
||||
@property
|
||||
def is_opening(self) -> bool:
|
||||
return self.coordinator.data.roof_moving and not self.coordinator.data.roof_open
|
||||
if not self.coordinator.data.roof_moving or self.coordinator.data.roof_open:
|
||||
return False
|
||||
direction = self.coordinator._last_roof_direction
|
||||
if direction is not None:
|
||||
return direction == "opening"
|
||||
return not self.coordinator.data.roof_closed
|
||||
|
||||
@property
|
||||
def is_closing(self) -> bool:
|
||||
return self.coordinator.data.roof_moving and not self.coordinator.data.roof_closed
|
||||
if not self.coordinator.data.roof_moving or self.coordinator.data.roof_closed:
|
||||
return False
|
||||
direction = self.coordinator._last_roof_direction
|
||||
if direction is not None:
|
||||
return direction == "closing"
|
||||
return not self.coordinator.data.roof_open
|
||||
|
||||
@property
|
||||
def current_cover_position(self) -> int | None:
|
||||
|
||||
Reference in New Issue
Block a user