Skip to content

v0.9.10

Choose a tag to compare

@martinarva martinarva released this 26 Mar 17:52

Bug Fix

First energy delta after periodic reset was silently dropped (#215)

After a daily, weekly, or monthly cost reset, the first energy increase from the underlying sensor was ignored — treated as a baseline re-initialisation instead of producing a cost increment. This meant the cost accumulated between the reset and the next sensor update was lost.

Root cause

The periodic reset cleared the internal energy baseline (_last_energy_reading = None), which caused the next energy reading to be consumed as a new baseline without calculating any cost.

Fix

The energy baseline is now preserved across resets. Only the cost accumulators are zeroed, so the next energy delta is correctly priced.

Affected versions

v0.9.3 through v0.9.9. Update to v0.9.10 to resolve.