Skip to content

v1.0.2

Choose a tag to compare

@martinarva martinarva released this 27 Mar 10:06

Bug fix: Wh and MWh energy sensors calculated cost incorrectly (#217)

Energy sensors reporting in Wh or MWh were treated as kWh, causing a 1000x error in the calculated cost:

  • A sensor in Wh produced costs 1000x too high
  • A sensor in MWh produced costs 1000x too low

The fix reads the unit_of_measurement attribute from the source energy sensor and applies the correct conversion factor before multiplying by the electricity price.

Affected setups: any configuration where the source energy sensor reports in Wh or MWh instead of kWh. Sensors already in kWh are unaffected.

What to do after upgrading: historical cumulative cost totals tracked by the integration will have been wrong. You may want to reset the energy cost sensors once after upgrading so they start accumulating correctly from a clean baseline.


Also includes internal improvements from v1.0.0 and v1.0.1:

  • Cost sensors now appear under the source device (e.g. heat pump) instead of a separate "Dynamic Energy Cost" device — requires Home Assistant 2025.8 or newer
  • Correct handling of energy sensor periodic resets