Skip to content

Commit

Permalink
set startup command
Browse files Browse the repository at this point in the history
  • Loading branch information
mikey0000 committed Aug 14, 2024
1 parent 82dc6e8 commit beff3a6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/mammotion/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,10 @@ async def _async_update_data(self) -> MowingDevice:
self.update_failures = 0
return self.device.luba_msg

async def _async_setup(self) -> None:
try:
await self.device.start_sync(0)
except COMMAND_EXCEPTIONS as exc:
self.update_failures += 1
raise UpdateFailed(f"Updating Mammotion device failed: {exc}") from exc

0 comments on commit beff3a6

Please sign in to comment.