#Gas Consumption Cost Calculation

1 messages · Page 1 of 1 (latest)

plush mesa
#

Yesterday I configured my gas energy dashboard to track my gas usage. The cost that is calculated by HA does not match what I am expecting. I suspect a configuration issue, but have not been able to identify it.

Sensor configurations that are used by the gas energy dashboard.

mqtt:
sensor:
- name: "Gas Meter Reading"
state_topic: "metermon/999999"
value_template: "{{ value_json.Consumption | float * 0.028316846592 }}" # convert ft³ to m³
unit_of_measurement: "m³"
state_class: "total_increasing"
device_class: gas

  • sensor:
    • name: "Columbia Gas PTC"
      state: "{{ 0.33169 }}"
      unit_of_measurement: "USD/therm"
      device_class: monetary

The cost that HA is calculating for 4.02 m³ of usage is $1.31 but I believe it should be ~$0.47.

Constants used in calculations

1 ft³ = 0.01 therm
1 ft³ = 0.028316846592 m³
1 therm = $0.33169

HA reporting

Usage: 4.02 m³
Cost: $1.31

Convert usage back to ft³

4.02 m³ / 0.028316846592 = 141.96 ft³

Convert usage to therm

141.96 ft³ * ( 0.1 therm / 1 ft³ ) = 1.4196 therm

Calculate Cost

1.4196 therm * ( 0.33169 USD/therm ) = $0.47 # HA is reporting $1.31

lyric matrix
#

It pretty close to lines up if it's just multiplying m3 by the provided rate (0.33).

#

I don't think 'therm' is a recognized unit is it?

wise ice
#

That conversion seems odd. Why calculate m³ from ft³ to then get ft³ from m³ to therm

#

You can simply hand homeassistant both in ft³ or both in m³

plush mesa
#

@wise ice the tutorial that I followed was created at a time when HA did not support ft³ and required converting to m³. I discovered today that HA now supports ft³ and the conversion was not necessary. A little while ago I did convert both sensors to ft³ and at the moment I am waiting on the energy dashboard to update to verify if that fixes my calculation. I think an hour needs to pass for the dashboard to update.

wise ice
#

Yes usually on the full hour mark