Skip to content

pantherale0/ha-fuelprices

Repository files navigation

Fuel Prices

GitHub Release GitHub Activity License

Project Maintenance BuyMeCoffee

Discord Community Forum

Integration to integrate with pyfuelprices.

This integration will set up the following platforms.

Platform Description
device_tracker Optional entities for fuel stations, attributes will contain fuel price data

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called fuel_prices.
  4. Download all the files from the custom_components/fuel_prices/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Fuel Prices"

Privacy notice

This integration relies entirely on cloud services, alongside this a few libraries are used to geocode provided coordinates into location data for certain providers such as GasBuddy or TankerKoenig.

For reverse geocoding a mix of Nominatim (https://nominatim.org/), these-united-states (https://pypi.org/project/these-united-states/) and reverse-geocode (https://pypi.org/project/reverse-geocode/). This is done to improve performance, for example, looking up provided coordinates with reverse-geocode will allow us to restrict the fuel station search to data providers available in only that country.

Similar to this, this integration will use these-united-states to retrieve the state of given coordinates, and finally Nominatim is used to retrieve the nearest postcode for the TankerKoenig data source.

Configuration is done in the UI

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines