Dutch gas prices addon

I want to share a Home Assistant add-on with you guys which allow you to have the gas prices of dutch gas stations within Home Assistant. This add-on can be found here:

This addon is based on the docker container and app that was created here Dutch Gas Priceses.

The features of this add-on are

  • It runs within Home Assistant (It is forked from Dutch-Gas-prices-API but does not need a separate docker host)
  • You can now find the cheapest gas station within a certain radius (max of 15km right now)
  • Fuel types Euro95, Euro98, Diesel and LPG are supported
  • RPi3 is supported, though tesseract is quite heavy. See the known issues for more information

As for now this is an alpha release, which means it functions. I want better integration with Home Assistant, and any help with that is very much appreciated!

If you have any feedback, please let me know!


Interesting. But can you help me with the use-case in relation to my “homeassistant”?

I can’t get it to work, created an issue on Git…

There are several

  1. If you just want to know the price of the fuel of a gas station, you can “monitor” that gas station
  2. Get to know the cheapest price within a radius of your home
  3. Get the know the cheapest price when you are driving
  4. If you have a smart car, or Torque - Home Assistant, you could get notified of the cheapest gas station based on your location and the level of gas in your car

@BebeMischa I had to recreate the repository so your issue is lost. Can you add it again? And while doing, could you review the log of the addon? And can you also review the home assistant log? Both might contain clues on whats going on

Thanks, I will give this a try after the holiday season!


After some struggles, Skons and I did get my addon working… :wink:

1 Like

So, this is now as close, as I can get, to what I want. Just can’t figure out, how to get the station names/adres to display in place of the entity number… Lovelace does not give me that choice…

can I change this code anyhow to achieve that?

type: entities
  - entity: gasstation.1
  - entity: gasstation.2
  - entity: gasstation.3
  - entity: gasstation.4
  - entity: gasstation.5
  - entity: gasstation.6
  - entity: gasstation.7
  - entity: gasstation.8
  - entity: gasstation.9
  - entity: gasstation.10
title: Euro98 prijzen binnen 5km van huis
state_color: false

You can change this by changing the dutch_gas_prices.py file

            "timestamp" : str(item.get('timestamp'))


            "timestamp" : str(item.get('timestamp')),
            "friendly_name" : item.get('name') + " (" + item.get('brand') + ")"

And you should see the name and the brand of the gas station. This is a quick fix for now. I will update the documentation when i get a better fix.

1 Like

You are fabulous!

This is good enough!

And yes, i did turn it around, like it more that way… :wink:

"friendly_name" : item.get('brand') + " (" + item.get('name') + ")"

Just updated DGP. Street and address are now retreived through OCR, not 100% as it should be but it is a start.

Also some documentation updates, timeout: 180 (which is sufficient for 9 stations on a RPi 3) needs to be added to the rest sensor. The stations data is cached for up to 1 hour, if it is not cached but retrieved from directlease, it will take longer then the default 10 seconds and therefore HA will process the result as empty.

You’ll also need to take a look at the python script :slight_smile:

The latest version does not handle the radius request correctly

To solve this, i will migrate to MQTT wich would create less overhead for the addon. It also makes it easier to use the addon within home assistant.

Please let me know if you oppose this or if you have a better/alternate solution

A few moments ago DGP has been updated to 2021.11.10.1 which means it is now communicating over MQTT, this is a breaking change. If you’ll update, it will only work if you give it some love.

The addon has shrunk by a half with this change, it also has more or less dedicated sensors and i think it is easier to configure. Please let me know if you experience any troubles!

1 Like

Oeps, it looks, like it need a bit more love, than expected. The automation described in manual won’t save.

issue: Automation malformed · Issue #10 · Skons/hassio-addons · GitHub

Which one? And do you have an error?

see the GitHub issue I’ve posted. :wink:

1 Like

Unfortunately, no response there… :see_no_evil:



:stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: