Skip to content

v1.13.3

Choose a tag to compare

@alexdelprete alexdelprete released this 21 May 14:50
v1.13.3
decb228

Release v1.13.3

GitHub Downloads

Release Date: 2026-05-21

Type: Patch release - Prevents cumulative energy sensors from dropping to 0 after a Home Assistant restart.

What's Changed

Fixed

  • Cumulative energy sensors dropped to 0 after a Home Assistant restart -
    The Alfa device returns 0 on its cumulative energy registers for ~100 seconds
    after a reboot (a device warm-up window) before the real meter value reappears.
    The v1.2.12 decrease-rejection guard protected against a device reboot while HA
    kept running, but not against an HA restart: on restart the in-memory baseline
    is reset to 0, so the guard had nothing to compare the warm-up 0 against, and
    the 0 was published as the sensor's first state. HA's TOTAL_INCREASING
    statistics then read the 7737 → 0 drop as a meter reset and double-counted
    (~23 kWh spurious sum). Sensors now use RestoreSensor to recover their last
    known value on startup, giving the existing guard a real baseline that survives
    the restart. Affects the 3 raw cumulative sensors (energia_prelevata,
    energia_immessa, energia_prodotta) and the 2 calculated energy sensors
    (energia_consumata, energia_auto_consumata).
    (Fixes #206)

Thanks to @M4v3r1cK87 for reporting the issue and
providing the debug log that pinpointed the device warm-up behaviour.

Full Changelog:
compare/v1.13.2...v1.13.3