Skip to content

Commit

Permalink
refactor: Formatting of debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 23, 2024
1 parent 6d5ad66 commit abbd534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/solarman/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def get(self, runtime = 0, requests = None):
for request in scheduled:
code, start, end = get_request_code(request), get_request_start(request), get_request_end(request)
quantity = end - start + 1
responses[(code, start)] = await self.try_read_write(code, start, quantity, f"Querying {code:02X} ~ {start:04} - {end:04} | 0x{start:04X} - 0x{end:04X} #{quantity:03}")
responses[(code, start)] = await self.try_read_write(code, start, quantity, f"Querying {code:02} | 0x{code:02X} ~ {start:04} - {end:04} | 0x{start:04X} - 0x{end:04X} #{quantity:03}")

result = self.profile.parser.process(responses) if requests is None else responses

Expand All @@ -152,4 +152,4 @@ async def call(self, code, start, arg):

async with asyncio.timeout(TIMINGS_UPDATE_TIMEOUT):
async with self._semaphore:
return await self.try_read_write(code, start, arg, f"Call {code:02X} ~ {start} | 0x{start:04X}: {arg}", False)
return await self.try_read_write(code, start, arg, f"Call {code:02} | 0x{code:02X} ~ {start} | 0x{start:04X}: {arg}", False)

0 comments on commit abbd534

Please sign in to comment.