Skip to content

Commit

Permalink
add further debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brußk committed Apr 23, 2024
1 parent dc47ca2 commit 6512918
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions aiopegelonline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ async def async_get_all_stations(self) -> dict[str, Station]:
for station in stations:
result[station["uuid"]] = Station(station)

LOGGER.debug("all stations: %s", result)

return result

async def async_get_nearby_stations(
Expand All @@ -85,6 +87,8 @@ async def async_get_nearby_stations(
for station in stations:
result[station["uuid"]] = Station(station)

LOGGER.debug("nearby stations: %s", result)

return result

async def async_get_station_details(self, uuid: str) -> Station:
Expand All @@ -93,7 +97,11 @@ async def async_get_station_details(self, uuid: str) -> Station:
f"{BASE_URL}/stations/{uuid}.json", {"prettyprint": "false"}
)

return Station(station)
result = Station(station)

LOGGER.debug("station %s details: %s", uuid, result)

return result

async def async_get_station_measurements(self, uuid: str) -> StationMeasurements:
"""Get all current measurements of a station."""
Expand All @@ -106,4 +114,8 @@ async def async_get_station_measurements(self, uuid: str) -> StationMeasurements
},
)

return StationMeasurements(station["timeseries"])
result = StationMeasurements(station["timeseries"])

LOGGER.debug("station %s measurements: %s", uuid, result)

return result

0 comments on commit 6512918

Please sign in to comment.