Skip to content

Commit

Permalink
fix: add logger to debug rest api #3
Browse files Browse the repository at this point in the history
  • Loading branch information
chilikla authored Nov 26, 2024
1 parent a8602ad commit ad812fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/yerushamayim/data_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ def _extract_data(self) -> YerushamayimData:
rain_data = {}
wind_data = {}
# _LOGGER.debug("rest_api", self.rest_api)
_LOGGER.debug("Yerushamayim is the best!")
if self.rest_api is not None and self.rest_api.data:
try:
rest = json.loads(self.rest_api.data)
_LOGGER.debug(json.dumps(rest, indent=2))
_LOGGER.debug(json.dumps(rest, indent=2))
rest_data = {}
for line in rest.strip().split('\n'):
parts = line.split('\t')
Expand Down

0 comments on commit ad812fe

Please sign in to comment.