I have build up an esp to count my gas meter inductivly which works perfectly. Now I want to calculate the price in the energy dashboard.
Since I count the gas in m³ and the price is per kWh, I created a sensor which calculates the price for every m³ of gas (which is pretty straight forward in germany):
The conversion from m³ to kWh is:
Consumption * Zustandszahl * Brennwert
For explanation:
“Brennwert” is the energy of the gas itself when it’s burned. The “Zustandszahl” describes the ratio of a gas volume in the standard condition to the gas volume in the operating condition. It mathematically converts the (geometric) gas volume measured by the gas meter under ambient conditions to a defined standard state.
I added my gas meter sensor to the energy dashboard and attached a price entity to this:
Now I consumed 1,66m³ of gas actually. Which is around 16,6 kWh (rounded for simplification). The price for 1 kWh is currently around 0,09€.
My sensor entity for the gas price in m³ is (after calculation in the template) around 0,90€ per m³. But the dashboard shows 0,20€.
Is there any delay or other calculations done in the dashboard or is the price calculated by the price which was actual price when the consumption was and how can I fix/correct this?
In Germany your provider has to provide the Brennwert and the Zustandszahl in your invoice so you can reconstruct the unit conversion from m3 to kWh (which is the main unit for calculating your invoice)
Hey Marco,
can you show me how i can get this price entity for the energy dasboard?
I have the Brennwert and Zustandszahl and my gas consumption in m³. But the cunsumption is not for a day. Its Only a total consumption since installation.
yes, exactly what I was looking for. Thanks for your groundwork @Disane87
By the way, I get the Brennwert directly from my network provider’s website using “multiscrape”. They even provide the 12-month review there, so I always automatically have the value that my provider also uses.
Unfortunately, I can’t find any publication of the Zustandszahl, otherwise I could get it directly