Fix set tilt position (#30428)

This commit is contained in:
tetienne 2020-01-03 11:31:05 +01:00 committed by Paulus Schoutsen
parent 3a18ef219b
commit f5aa89dd06

View File

@ -91,15 +91,15 @@ class SomfyCover(SomfyEntity, CoverDevice):
def set_cover_tilt_position(self, **kwargs): def set_cover_tilt_position(self, **kwargs):
"""Move the cover tilt to a specific position.""" """Move the cover tilt to a specific position."""
self.cover.orientation = kwargs[ATTR_TILT_POSITION] self.cover.orientation = 100 - kwargs[ATTR_TILT_POSITION]
def open_cover_tilt(self, **kwargs): def open_cover_tilt(self, **kwargs):
"""Open the cover tilt.""" """Open the cover tilt."""
self.cover.orientation = 100 self.cover.orientation = 0
def close_cover_tilt(self, **kwargs): def close_cover_tilt(self, **kwargs):
"""Close the cover tilt.""" """Close the cover tilt."""
self.cover.orientation = 0 self.cover.orientation = 100
def stop_cover_tilt(self, **kwargs): def stop_cover_tilt(self, **kwargs):
"""Stop the cover.""" """Stop the cover."""