github rwoldberg/ldata-ha v.2.0.5
Support for WHEM v2.1.0 Firmware

11 hours ago

New Web API from Leviton, newly exposed data fields and the loss of something important. WHEM lifetime hardware counters might be gone with the update of WHEM firmware v2.1.0, this means that the integration can no longer use the delta between readings as it's main calculation and must fall back to 'power x time'.

I will continue to monitor for API and firmware updates, but in my observations the once lifetime values might be daily (they never seem to grow large enough though).. possibly hourly, or just a shifting near zero value...

New Features

  • reset_panel_energy service — New bulk-reset service that resets all energy sensors for an entire WHEM panel at once (given a device_id). From Settings > Developer tools >Actions > Reset all Panel Energy Sensors.
  • CT spike detection — New _CT_POWER_MAX_W = 25_000 cap in sensor.py replaces ratio-based spike detection with a fixed 25 kW threshold.
  • Energy gap-handling — New _calc_pxt_energy() function in sensor.py with configurable skip/extrapolate/average modes for power×time calculations.

Improvements

  • State management — ldata_service.py replaces _breaker_last_good with _panel_needs_breaker_poll (per-panel flag)
  • added _leviton_api_version tracking output to log

Refactoring

  • Reset logic in init.py extracted into a _reset_energy_entity() helper, shared between the existing single-sensor reset and new panel-wide reset.
  • REST_POLL_INTERVAL = 60 constant removed from coordinator.py.

Don't miss a new ldata-ha release

NewReleases is sending notifications on new releases.