From cc8103c0ea0ebafdde4b69133ccd9d5160141daa Mon Sep 17 00:00:00 2001 From: dentra Date: Thu, 28 Nov 2024 21:39:05 +0300 Subject: [PATCH] sync with new api version --- custom_components/pesc/pesc_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/pesc/pesc_client.py b/custom_components/pesc/pesc_client.py index a411d8f..352767e 100644 --- a/custom_components/pesc/pesc_client.py +++ b/custom_components/pesc/pesc_client.py @@ -226,7 +226,7 @@ async def async_login(self, username: str, password: str) -> str: headers["Captcha"] = "none" payload = {"type": "PHONE", "login": username, "password": password} result = await self._session.post( - f"{self._API_URL}/v6/users/auth", headers=headers, json=payload + f"{self._API_URL}/v7/users/auth", headers=headers, json=payload ) json = await self._async_response_json(result) self.token = json["auth"] @@ -246,7 +246,7 @@ async def async_update_value( payload, ) result = await self._session.post( - f"{self._API_URL}/v6/accounts/{account_id}/meters/{meter_id}/reading", + f"{self._API_URL}/v7/accounts/{account_id}/meters/{meter_id}/reading", headers=self._headers, json=payload, )