Skip to content

Latest commit

 

History

History
227 lines (150 loc) · 9.09 KB

File metadata and controls

227 lines (150 loc) · 9.09 KB

Changelog

[2026.3.4] - 2026-03-23

Added

  • Battery cycle support:
  • Native cycle counter sensor via register 34003 for a, d, and e_v3.
  • Calculated cycle sensor (battery_cycle_count_calc) for all device profiles (a, d, e_v3, e_v12) based on total_discharging_energy / battery_total_energy.

Changed

  • Sensor setup in sensor.py refactored to a compact grouped entity creation loop.
  • Cycle sensor translation labels aligned across locales and naming simplified (Cycle Count / Cycle Count (Calc)).

[2026.3.3] - 2026-03-04

Added

  • Per-field schedule support: split packed schedule blocks into individual registers and expose schedule_1..6 as separate entities (*_days, *_start, *_end, *_mode, *_enabled) in the register maps for a.yaml, d.yaml, e_v3.yaml and e_v12.yaml.

Changed

  • Schedule entities set to category: config and scan_interval: very_low (default 300s); README updated with schedule rows and notes about HHMM time input and day-selection limitations.
  • Device-specific schedule_*_mode limits applied (A / E-v3: -2500..2500 W, D: -2200..2200 W).
  • Load YAML register definitions off the Home Assistant event loop to avoid blocking (async-safe coordinator changes).

Fixed

  • Decoding and signed int16 handling for schedule mode values and writes improved.

[2026.3.2] - 2026-03-03

Added

  • Schedule support: read/write packed schedule blocks (6 schedules × 5 registers) exposed as aggregated sensors with enriched attributes and enable switches.
  • Expose raw schedule registers in entity attributes for easier debugging.
  • Translations for schedule sensors added (en/nl/de).

Changed

  • Avoid blocking YAML I/O on the Home Assistant event loop when loading register definitions.
  • Sensor state for schedules now represents the enabled flag; full decoded schedule is available in attributes (days_list, start_time, end_time, mode, power, enabled_bool, raw).
  • Modbus client returns raw register lists for schedule blocks; coordinator persists raw + decoded attrs; sensor performs decoding and formatting.

Fixed

  • Handle signed int16 mode values correctly when writing schedules (two's-complement conversion).
  • Fixed import/indentation issues and improved debug logging for Modbus reads/writes.

[2025.11.1] - 2025-11-17

Added

  • Config flow: Unit ID is now a plain input field, with validation and error handling.

[2025.10.1] - 2025-10-15

Added

  • Config flow now asks for device version (v1/v2 or v3) during setup so the integration can load the correct register map at runtime.
  • Per-version register modules: registers_v12.py (v1/v2) and registers_v3.py (v3). The integration selects the right definitions based on the chosen version.

Fixed

  • Options flow: removed deprecated explicit config_entry assignment (compatibility with HA 2025.12).
  • Modbus client: properly handle CancelledError during shutdown; guard reconnection and client recreation to avoid NoneType errors and noisy ERROR logs on stop/reload.
  • Efficiency sensors: skip calculations when denominators are zero or required inputs are missing to avoid division-by-zero errors.
  • Energy sensors: ensure state_class is set to total or total_increasing for sensors with device_class: energy.

Notes

  • registers_v3.py is generated from CSV mapping; entries are untested and require manual verification on v3 hardware before production use.

[2025.9.4] - 2025-09-22

Added

  • Configurable scan intervals (high, medium, low, very_low) through integration options.
  • Options flow with translated titles and descriptions.

Changed

  • Coordinator now dynamically adjusts polling interval based on the lowest configured scan interval.

Fixed

  • Corrected calculation of Actual Conversion Efficiency to properly handle charging vs discharging, avoiding efficiencies above 100%.
  • Properly handle Modbus client closing when disabling the integration.
  • Correctly apply updated polling intervals after options are changed.

[2025.9.3] - 2025-09-16

Added

  • New Actual Conversion Efficiency calculated sensor to display the real-time charging/discharging efficiency as a percentage.

Fixed

  • Fixed proper closing of Modbus connections when disabling and enabling entities, preventing multiple open sessions.
  • Corrected state class for stored energy sensors to match energy device class requirements.
  • Corrected calculation of Actual Conversion Efficiency to properly handle charging vs discharging, avoiding efficiencies above 100%.

[2025.9.2] - 2025-09-07

Fixed

  • Corrected scaling for Number entities, ensuring min, max, and current values reflect the defined scale.
  • Updated logging to include scale and unit when values are updated in Home Assistant.

[2025.9.1] - 2025-09-05

Fixed

  • Switch writing fixed and now implemented with optimistic mode to handle delayed device response.
  • Fixed PyModbus 3.x / Python 3.9 compatibility: replaced slave with device_id.

[2025.9.0] - 2025-09-03

Added

  • Dependency keys registration so required values are always fetched even if disabled in Home Assistant.
  • Polling now handled centrally via the DataUpdateCoordinator.
  • Dynamic polling intervals based on sensor definitions and dependencies.

Changed

  • Calculated sensors (Round-Trip Efficiency Total, Round-Trip Efficiency Monthly, Stored Energy) with dependency handling
  • Improved logging for dependency mapping, calculation, and skipping disabled entities.
  • Cleaned up and refactored sensor calculation logic to be reusable and PEP8 compliant.

[2025.8.1] - 2025-08-12

Added

  • New Min Cell Voltage sensor (register 35043) to monitor minimum battery cell voltage
  • New Max Cell Voltage sensor (register 36943) to monitor maximum battery cell voltage
  • New Reset Device button (register 41000) to allow resetting the battery management system via Home Assistant

Changed

  • Clean up code and improve overall code quality

[2025.8.0] - 2025-08-09

Fixed

  • WiFi strength sensor now reports correct negative dBm values
  • Corrected cell temperature reading after BMS firmware version 213

[2025.7.1] - 2025-07-18

Added

  • New WiFi status sensor (register 30300): 0 = Disconnected, 1 = Connected
  • New Cloud status sensor (register 30302): 0 = Disconnected, 1 = Connected
  • New WiFi signal strength sensor (register 30303), value in dBm

[2025.7.0] - 2025-07-17

Added

  • Fully asynchronous operation for optimal performance and responsiveness
  • Background sensor update functionality temporarily disabled (to be resolved later)
  • New Charge to SOC select entity
  • New Discharge Limit Mode sensor
  • New 'Cutoff to SOC' number entities for charge and discharge

Fixed

  • Improved error handling for incorrect count of received bytes during Modbus communication
  • Added validation to ensure the returned Modbus register matches the requested address and expected byte length

[2025.6.4] - 2025-07-10

Added

  • New fault sensor combining grid fault bits from register 36100
  • Grid Status sensor with decoded standard options from register 44100
  • Support for scan_interval per sensor in SENSOR_DEFINITIONS
  • Support for Modbus connection timeout and message_wait_milliseconds
  • Background polling for data needed by derived sensors (e.g. SOC, Energy)
  • New efficiency sensors: Round-Trip Efficiency (monthly, total) and Stored Energy, calculated from other register values

Changed

  • Improved polling interval resolution using fastest required scan rate

[2025.6.3] - 2025-07-08

Added

  • Entities now correctly register under a device in Home Assistant
  • Select entity replaces Force Charge/Discharge Mode switches (42010)
  • Improved error handling with specific Modbus connection error messages
  • Universal handling of Modbus types (uint16, int32, char)
  • All entity types now support enabled_by_default flag

Fixed

  • TypeError when writing to registers (fixed incorrect register= argument)
  • Translation loading and fallback for config flow error messages

[2025.6.2] - 2025-07-07

Added

  • enabled_by_default: false set for all sensors except key ones (e.g. voltage, current, SOC)
  • Example Lovelace dashboard added to the integration folder
  • Support for Modbus int32 and char register types

Changed

  • Select, Number, and Switch entities now implement async_update() and reflect real device state
  • Improved state mapping for sensors using states dictionary

Fixed

  • Correct mapping of 'Trade Mode' (value 2) in select register
  • All switch and number entities now generate truly unique IDs per integration instance

[2025.6.1] - 2025-07-07

Added

  • Combined alarm sensor decoding multiple alarm bits into one entity
  • Support for char type registers with proper string decoding
  • Improved sensor state mapping with states dictionary

Fixed

  • Fixed sensor registration to avoid duplicate unique IDs
  • Corrected read_register to properly handle int32 and char types

[2025.6.0] - 2025-07-06

Added

  • Initial release with basic sensor and switch support
  • Support for Modbus int16 and uint16 registers
  • Basic configuration and polling

Changed

  • Updated documentation and improved code structure