Adding gas to energy dashboard (solved)

You’re missing a state_class: total_increasing or total depending on what data the meter provides

1 Like

With this topic I finally found out why my gas meter wasn’t showing up on my energy dashboard. I went in the developer tools, and clicked States and search for my gas meter entity. Indeed it did not have unit_of_measurement: m³. When I want to add it, it shows up briefly after hitting Set state but after a minute or so it disappears again. It looks like it doesn’t save somehow?

SO ANNOYING! Congratulations! That fixed it for me. I accidentally messed up my template the first time. I went back in and fixed the error but HA did not automatically update it in the database. I went in as you said and clicked “fix issue”. I also had to use F5(page refresh) in my energy dashboard but now I’m all good!

1 Like

When everything was correct here,it still wouldn’t show up. Then I changed the name of the template sensor, and only then the problem was fixed.
Then I found in Developer Tools that the sensor with the old name had many issues.

I cant add gas sensor to energy panel. in the sensor selection window, HA writes the following information:

"Choose a sensor that measures gas consumption in GJ, kWh, MJ, MWh, Wh units.

Note. It is not possible to add sensors that measure the volume of the gas and sensors that measure the amount of energy contained in the gas."

That is, HA does not allow adding a gas sensor with m3 measurement to the energy panel. When I change the unit_of_measurement from m3 to kWh, the sensor appears in the list, it does not want m3. there are no problems with statistics in the developer panel.

found this thread… hoping it might still be active.
I just integrated my Rheem HVAC into ESPHome (via M5Stack). now I have get gas metrics on usage…
image

Wondering how to convert this measurement in the energy dashboard to a price $$$$… however all I know is I pay $1.999/gal of propane, so a little lost on the conversion.

Convert cu. ft to gallon, from a google search I got this number > 1 gallon propane = 35.97 cubic feet propane. (2.78 Gallons per 100 cubic feet)

844.24549 cu. ft / 35.97 = 23.47082263 liquid gallons.

23.47 x $1.99 = $46.70 - Which seems quite expensive.

So, roughly, you are paying $ 0.055323881 per cu. ft. Add that as your cost in energy dashboard. You could also create your own template sensor to approximate cost.

I appreciate you solving this…
I’ll see if I can unwind your math to get the $0.055323881 value per cubic foot.

$1.99 divided by cubic feet per gallon

1.99 / 35.97 = 0.055323881

1 Like

I’de have to agree with you… this seems off (very high)

If I take that value and multiply by 0.0553, I get $218.02 for the last 24hrs of use and my furnace didn’t hardly run today. Thinking the reporting is off for cubic ft used.

maybe its 39.4257389, so your current value divided by 100? that would be a little over 1 gallon or $1.99.

Edit: or divide by 10 = 394.257389 / 35.97 = 10.96 gallons or $21.81

I’ll have to play with this some more.
I’m also looking at a Mopeka BLE tank monitor sensor to help with tracking daily usage… there is a ESP integration for that into HA that might help take some of the brain damage out of the picture.

Can u show me your esphome yaml? Maybe I can spot an issue where it does the calculations.

My gas metereasires on litres but, the hass integration converts it to cubic meters, I had to add a / 100 to my meter to get the correct usage after hass’s automatic conversion.

How does your esphome read the usage?

dont have the esphome integration yet… just looking into it.