Extracting specific data for calculating costs natural gas (BE)


I have a very specific question. Does someone know how I can extract the gross caloric value from this official source?
Every month they put a .txt file online with the GCV of the past month. But I’m not able to let Home Assistant get info from those files.

If someone has a good website for tracking the Zeebrugge LNG market price index, that would be very useful as well. At this moment I scrape it from the ENGIE website. But I’m not sure I set up the scraper that specific to always get the right value out of it.

Thank you for reading my post, hopefully, someone can make me a little bit smarter on this topic.

If someone who reads this, wants to know how to extract the GCV. Gross caloric values are necessary to make an exact calculation from volume (m³) to energy (kWh). In Belgium those values are monthly posted in an ontline txt file by atrias.be (fluvius).

  - platform: rest
    name: gross_caloric_value
    value_template: '{{ value.split("IVEKA ANTWERPEN,")[1].split(",")[2].split("GOS")[0]  | float(0)}}'
    resource: https://api.atrias.be/roots/download/SectorData%2F02%20Gross%20Calorific%20Values%2F2023%2FGCV202303.txt?subscription-key=086361ae1bbf4e2e8a4fa9804cae087a
    verify_ssl: false
    unit_of_measurement: "kWh/Nm³"```

With some small modifications you can make the link to the file with variable date.

Hi Jeroen, when using rest sensor, you should definitely set the param scan_interval, as with your setup you will query the same source way too many times resulting in high traffic and thus high chances to get blocked completely by their api manager montiorring
Btw, this source you use is not being updated, so you could as well set a manual input_number helper instead of fetching the same value over and over again.

Hi Jeroen, for your information, I’ve now created a new HACS integration to fetch data of ‘Mijn Energie.be’: GitHub - myTselection/MyEnergy: Home Assistant custom component HACS integration to Belgium MijnEnergie.be (MonEnergie.be) sites to compare and save on your electricity and gas prices in Belgium,
I also have another integration GitHub - myTselection/Carbu_com: Home Assistant custom component HACS integration to Carbu.com site to compare and save on your fuel oil / heating oil (mazout) and fuel (diesel, super and lpg) purchases in Belgium, France and Luxembourg. Fuel prices supported for Netherlands, Germany and Italy too! to track local fuel prices
It might (maybe) also be useful for your needs. Feel free to provide feedback or indicate what would be useful extension of it…