Skip to content

Commit

Permalink
fix stuff that was supposed to be commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
mikey0000 committed Sep 14, 2024
1 parent aa953fe commit 0044609
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions custom_components/mammotion/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady, HomeAssistantError
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.storage import Store
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from pymammotion.aliyun.cloud_gateway import DeviceOfflineException, SetupException
from pymammotion.data.model import GenerateRouteInformation
Expand All @@ -24,7 +23,6 @@
Mammotion,
)
from pymammotion.proto import has_field
from pymammotion.proto.luba_msg import LubaMsg
from pymammotion.proto.mctrl_sys import RptAct, RptInfoType
from pymammotion.utility.constant import WorkMode

Expand Down Expand Up @@ -94,9 +92,7 @@ async def async_setup(self) -> None:
try:
await self.manager.login_and_initiate_cloud(account, password)
except ClientConnectorError as err:
raise ConfigEntryNotReady(
err
)
raise ConfigEntryNotReady(err)

# address previous bugs
if address is None and preference == ConnectionPreference.BLUETOOTH:
Expand Down Expand Up @@ -136,7 +132,7 @@ async def async_setup(self) -> None:
f"Could not find Mammotion lawn mower with name {self.device_name}"
)

await self.async_restore_data()
# await self.async_restore_data()
try:
if preference is ConnectionPreference.WIFI and device.cloud():
device.cloud().on_ready_callback = lambda: device.cloud().start_sync(0)
Expand Down Expand Up @@ -367,7 +363,7 @@ async def _async_update_data(self) -> MowingDevice:

self.update_failures = 0
data = self.manager.get_device_by_name(self.device_name).mower_state()
await self.async_save_data(data)
# await self.async_save_data(data)
return data

@property
Expand Down

0 comments on commit 0044609

Please sign in to comment.