pantherale0 / ha-fuelprices

A generic and extensible integration with pyfuelprices to retrieve local (or remote) fuel price data.
MIT License
16 stars 2 forks source link

2024.1.0b0 - warnings in logs for gasbuddy #5

Closed pantherale0 closed 8 months ago

pantherale0 commented 8 months ago

System Health details

N/A

Checklist

Describe the issue

Gasbuddy logs warnings during update hook when an area is not within USA

Reproduction steps

  1. Setup integration
  2. Wait for updater to execute

Debug logs

Logger: pyfuelprices.sources.usa.gasbuddy
Source: runner.py:188
First occurred: 5 January 2024 at 23:26:55 (72 occurrences)
Last logged: 10:27:23

Ignoring area {'radius': 5.0, 'lat': 53.068464, 'long': 12.532709} as it is not found in USA.
Ignoring area {'radius': 5.0, 'lat': -31.994327, 'long': 115.930681} as it is not found in USA.
Ignoring area {'radius': 5.0, 'lat': 52.23817, 'long': 6.58763} as it is not found in USA.

Diagnostics dump

No response

poudenes commented 8 months ago

I had same issue. Did you forgotten to give a "source" in your configuration. I was forgotten that.

pantherale0 commented 8 months ago

I had same issue. Did you forgotten to give a "source" in your configuration. I was forgotten that.

Thanks, I know where the "problem" is, the GasBuddy source does intentionally log these warnings in the data provider so I just need to remove this line of code (and the next two afterwards).

https://github.com/pantherale0/pyfuelprices/blob/02f92978d2a47c6d05e02fc89e0b20f857ef9f3a/pyfuelprices/sources/usa/gasbuddy.py#L121