Skip to content

Commit

Permalink
alfen.py: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ikruglov committed Apr 16, 2024
1 parent a64c026 commit 51999a2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/alfen_wallbox/alfen.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,9 @@ async def _update_value(self, api_param, value, allowed_login=True) -> ClientRes

async def _get_value(self, api_param):
"""Get a value from the API."""
response = await self._get(url=self.__get_url(
f"{PROP}?{ID}={api_param}"))

_LOGGER.debug(f"Status Response {response}")
cmd = f"{PROP}?{ID}={api_param}"
response = await self._get(url=self.__get_url(cmd))
_LOGGER.debug(f"Status Response {cmd}: {response}")

if response is not None:
if self.properties is None:
Expand All @@ -273,9 +272,10 @@ async def _get_all_properties_value(self):
nextRequest = True
offset = 0
while (nextRequest):
response = await self._get(url=self.__get_url(
f"{PROP}?{CAT}={cat}&{OFFSET}={offset}"))
_LOGGER.debug(f"Status Response {response}")
cmd = f"{PROP}?{CAT}={cat}&{OFFSET}={offset}"
response = await self._get(url=self.__get_url(cmd))
_LOGGER.debug(f"Status Response {cmd}: {response}")

if response is not None:
properties += response[PROPERTIES]
nextRequest = response[TOTAL] > (
Expand Down

0 comments on commit 51999a2

Please sign in to comment.