Skip to content

Commit

Permalink
Merge 1688395 into cbc0c30
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Dec 21, 2020
2 parents cbc0c30 + 1688395 commit a2ae8e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xknx/devices/cover.py
Expand Up @@ -253,11 +253,13 @@ async def _target_position_from_rv(self):

async def _current_position_from_rv(self):
"""Update the current postion from RemoteValue (Callback)."""
position_before_update = self.travelcalculator.current_position()
if self.is_traveling():
self.travelcalculator.update_position(self.position_current.value)
else:
self.travelcalculator.set_position(self.position_current.value)
await self.after_update()
if position_before_update != self.travelcalculator.current_position():
await self.after_update()

async def set_angle(self, angle):
"""Move cover to designated angle."""
Expand Down Expand Up @@ -325,7 +327,7 @@ async def process_group_write(self, telegram):
self.travelcalculator.stop()
await self.after_update()

await self.position_current.process(telegram)
await self.position_current.process(telegram, always_callback=True)
await self.position_target.process(telegram)
await self.angle.process(telegram)

Expand Down

0 comments on commit a2ae8e4

Please sign in to comment.