diff --git a/pyIndego/indego_async_client.py b/pyIndego/indego_async_client.py index 9bdc5bf..15b34d0 100644 --- a/pyIndego/indego_async_client.py +++ b/pyIndego/indego_async_client.py @@ -446,8 +446,8 @@ async def get_user(self): async def login(self, attempts: int = 0): """Login to the api and store the context.""" response = await self._request( - method=Methods.POST, - path="authenticate", + method=Methods.GET, + path="authenticate/check", data=DEFAULT_BODY, headers=DEFAULT_HEADER, auth=BasicAuth(self._username, self._password), @@ -524,7 +524,7 @@ async def _request( # noqa: C901 ) return None if status == 401: - if path == "authenticate": + if path == "authenticate/check": _LOGGER.info( "401: Unauthorized, credentials are wrong, won't retry" ) diff --git a/pyIndego/states.py b/pyIndego/states.py index 8e844ae..57a36e9 100644 --- a/pyIndego/states.py +++ b/pyIndego/states.py @@ -167,6 +167,8 @@ class GenericData: model_description: str = None model_voltage: ModelVoltage = field(default_factory=ModelVoltage) mowing_mode_description: str = None + #renew_date: str = None + renew_date: datetime = None def __post_init__(self): """Set model description, voltage, mode description.""" @@ -179,6 +181,7 @@ def __post_init__(self): self.mowing_mode_description = MOWING_MODE_DESCRIPTION.get( self.alm_mode, DEFAULT_LOOKUP_VALUE ) + self.renew_date = convert_bosch_datetime(self.renew_date) @dataclass @@ -317,6 +320,7 @@ class State: svg_yPos: int = None config_change: bool = None mow_trig: bool = None + enabled: bool = None @dataclass