Skip to content

Commit

Permalink
Added handle for when blind is not moving to avoid unnecessary calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pink88 committed Jan 19, 2025
1 parent 0e205c6 commit a664a46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/tuiss2ha/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ async def stop(self) -> None:
_LOGGER.debug("%s: Attempting to stop the blind.", self.name)
command = bytes.fromhex("ff78ea415f0301")

#skip if the blind is not moving
if self._moving == 0:
return

# try to connect to blind if not connected, shouldnt really be necessary if the blind is already moving
if not self._client or not self._client.is_connected:
await self.attempt_connection()
Expand Down

0 comments on commit a664a46

Please sign in to comment.