The inferred balancing flag stops the Cut-Off timer while the cell spread
stays above bms_balance_trigger_voltage. A pack that does not actually
balance (no balancer, balancing disabled, or a balancer too weak for the
pack) never closes its spread, so the charge stayed in Cut-Off until the
EOC timer ended it, or indefinitely with the EOC timer switch off.
bms_fake_equalizing_enabled now defaults to 'false' for every BMS that
includes the package (EG4 LL V2, Seplos V1/V2, Seplos V3, JK RS485
DISPLAY, Fake/Demo BMS): the flag reports the constant false these
packages used to hardcode. Set it to 'true' per BMS to enable it.
Charging_logic.md and Changelog_Fake_Equalizing.md describe the new
default and the warning.
The Junctek KHF component was refreshed on every build (0s) and the
Victron UART component every 60s. Both are now refreshed every 60min.
The GitHub header of the two Victron UART packages pointed to
KinDR007/VictronMPPT-ESPHOME, while the component comes from
GHswitt/VictronMPPT-ESPHOME. It now names GHswitt.
Fabian-Schmidt/esphome-victron_ble no longer compiles with current
ESPHome. The external component now comes from the
darek-margas/esphome-victron_ble fork, and the GitHub header of the
three Victron BLE packages points to it.
The component is now refreshed every 60min instead of on every build.
Outside Float, the Auto Float interval cleared var_auto_float to 0. When
Float started, the CVL dropped to the final Float voltage for up to 60s,
then rose back to Bulk on the next interval tick before the step-down.
The delta is now kept armed at Bulk - Float outside Float. The core only
adds it while the instruction is Float, so Bulk and Stop are unchanged,
and the first Float CVL is the Bulk voltage.
Issue #353
The same two lines stopping the Cut-Off and EOC timers were repeated in
five places: entering Bulk, both Wait branches, the suspended charging
logic and the EOC script. They are replaced by a call to the new
yambms_script_stop_timers script.
The script has no delay, so execute() runs both stops before returning
to the caller: the timers are stopped before the next line runs, as
before. No behaviour change.
Fixes#342
* EG4 LL-V2: no General alarm for a full pack, component v1.1.2
EG4 packs hold protection bit 12 ("Low Capacity") while they are full and
have stopped charging, and it clears once they discharge. It was mapped to
General alarm, so every full charge raised a YamBMS alarm and sent it to
the inverter over CAN (#342). It is no longer mapped.
Discharge over temperature (0x0200) and discharge under temperature
(0x0800) protection were not mapped; they now raise the high and low
temperature alarms, as charge OT/UT already raise the charge ones.
Component v1.1.2 tracks each register block on its own
(RAR/esphome-eg4-bms#9): a pack goes offline when either block stops
giving valid replies, and that block's sensors publish NaN, so the
bitmask lambda now reads a NaN bitmask as no bits.
* EG4 LL-V2: component v1.1.3 (bus turnaround gap)
v1.1.2 took packs offline on a shared bus: a request sent right after
another pack's reply was often not answered. v1.1.3 waits a turnaround
time (50 ms) after each reply (RAR/esphome-eg4-bms#9).
* EG4 LL-V2: update date and version of the changed YAMLs
* EG4 LL-V2: component v1.1.4 (only the awaited reply ends the wait)
In the CCL and Float + CCL modes, the offset -(Max Charge Current - Auto
SoC Limit CCL) was computed once, when the target SoC was reached, and
then kept until the SoC dropped below the hysteresis. If the Max Charge
Current increased in the meantime (a pack rejoining the bank, a BMS
raising its limit), the cached offset applied to the larger maximum
released the limit: e.g. 141A requested instead of 1A.
While the target is reached in a CCL mode, the offset is now recomputed
on every pass, before the 60s throttle. A NaN Max Charge Current leaves
the previous offset in place.
Reported in #352
The cut-off timer (180s) and the EOC timer (30min) were only stopped when
the Bulk phase was re-entered. While the charging logic was suspended (no
BMS combined) or in Wait (charging not allowed), they kept running, so a
dropout or a charge block during the Cut-Off phase could declare an EOC
with no BMS data to confirm it: the status went to Float or EOC, SoC 100%
could be sent and the rebulk days counter was reset.
Both timers are now stopped while the logic is suspended and whenever the
status is set to Wait. With bms_options_charging_logic.yaml, Wait is only
entered when the Charging switch is off, so the Cut-Off performed by
YamBMS itself is not affected. When charging is allowed again after a
Wait in Cut-Off, a new Bulk starts and the Cut-Off phase is run again.
Charging_logic.md is updated accordingly.
Reported in #352
The 1.8.0 CVL rework added the Auto Float delta to the requested charge
voltage for every charging instruction. Auto Float clears that delta on
its own 60s interval once the instruction is no longer Float, so after a
Float => Bulk transition (Force Bulk, rebulk rules, Force Charge) the CVL
was the Bulk voltage plus the delta for up to 60s. The delta can reach
Bulk - Float when Float has just been entered.
The delta is now added in the Float branch only, as in 1.7.0. Auto CVL
and the custom CVL still apply to every instruction.
Reported in #352
Each alarm and warning of 0x35A is a 2-bit field : 1 is active, 2 is
inactive (OK), 0 and 3 mean not supported. YamBMS only set the active
bit and left 00 otherwise, so an inverter read every field that was not
in alarm as "not supported" instead of OK.
Every field is now written explicitly, active or inactive, and a frame
with no alarm is AA AA AA 02 AA AA AA 02, which is what a BYD battery
sends at rest. The reserved fields of bytes 3 and 7 stay at 0. The
mapping of the YamBMS bits is unchanged.
The frame is sent by PYLON V2, SMA and Victron. SMA calls the two bits
"arrive" and "leave", with the same meaning. The alarms are only
displayed and logged by the inverter, they do not change how it charges.
Design_decisions.md records why OK must never be sent as 0.
Charge Over Current was set with 0x80 in bytes 1 and 3, a copy of the
Discharge Over Current value of byte 0. PYLON V1 and V2, LuxPower and the
other 0x359 specifications put it on bit 0 of both bytes, which is also
where 0x35A already sends it. Bit 7 is undefined, so the inverter never
saw the alarm.
UnBalanced Cell was sent on bit 4 of bytes 1 and 3. PYLON V2 defines byte
1 bit 4 as an external communication timeout that stops charge and
discharge, so a cell imbalance alarm could stop the inverter. Byte 3 bit
4 is reserved. Neither is sent any more; cell imbalance is still sent on
0x35A.
The frame layout is the same in PYLON V1 and V2, so the fix applies to
both, and to LuxPower which shares frame 5.
The alarm bitmask was published only when the number of BMS in alarm
equalled var_bms_counter, the number of configured BMS. But only
combined BMS are counted in alarm, so with one BMS offline or missing a
value the alarm could never be raised : the inverter received only the
warning bits, and the "Alarm" text sensor showed "Warning".
STEP 2 now compares with var_to_combine_bms_counter. An uncombined BMS
is offline or has missing data, it does not count as "not in alarm".
This matches the rest of the combiner, where charge and discharge are
already decided by the combined BMS only.
The "Alarm" text sensor no longer compares counters : it is derived from
the published alarm and warning bitmasks, so it shows what is sent to
the inverter.
The comment on the alarm sensor said "bitwise AND", it is an OR.
The board_name substitution of each board_*.yaml only reached the
telemetry POST. Home Assistant had no way to read it: the device model is
replaced by the project name, and a sub-device carries no model.
device_base.yaml declares a "Board name" diagnostic text sensor on the
board sub-device. Its value is a constant, so it is published once from
the existing on_boot at priority 600, and update_interval is never: the
API resends the stored state on every connection.
The Diagnostic card of the HA dashboards shows it in a Board row, under
Chip.
The RPi Pico board does not include device_base.yaml and has no such
sensor.
The sniffer packages load the JK RS485 components from the dev branch of
Sleeper85/esphome-components (JK RS485 1.2) until it is tested and merged
into main ; they will then go back to @main.
JK RS485 1.2 removes the protocol_version key of jk_rs485_sniffer (the
JK-PB RS485 protocol has only one version) and refuses it, while 1.1
requires it : both changes have to be made together. The sniffer packages
no longer pass it, and the sniffer_protocol var is removed from the JK-B
and JK-PB RS485 YAML and examples. A user YAML that still defines
sniffer_protocol keeps working, the var is simply unused.
The JK RS485 component never published a value for them : the
"precharging" switch had no register and wrote nothing, and the
"operation status" and "battery type" text sensors were never decoded.
They stayed unknown in Home Assistant and are removed from the component
in JK RS485 1.2.
The "status precharging" binary sensor, which works, is kept.
Same declaration as the other sniffer packages: the UART comes from
board_options_itf_${sniffer_uart_id}.yaml, with sniffer_uart_baud_rate
(default 115200).
When charging was not allowed, the status went to Wait, also from Float or
EOC. When charging was allowed again, the Init / Wait -> Bulk rule came
first in the rebulk chain, so a full battery got the Bulk voltage again
after any short block, without any rebulk rule being checked.
The status is now kept in var_charge_status_before_wait on entering Wait.
When charging is allowed again, Float or EOC is restored before the Force
Bulk and rebulk rules, which then decide whether a new Bulk is needed.
Any other status goes to Bulk as before.
A dedicated variable is used rather than var_eoc: Auto SoC Limit sets
Float without a full charge and leaves var_eoc false on purpose, and that
Float must be restored too.
Charging_logic documents when the status goes to Wait and what happens
when charging is allowed again.
Fixes#343
The STEP 3 guard tested its values with has_state(), which ESPHome sets on
every publication, NaN included. STEP 2 publishes NaN when no BMS is
combined, so STEP 3 ran on every tick of a boot or a BMS dropout. The
charging logic then saw "Charging allowed" false and set the status to
Wait, and the Init/Wait -> Bulk rebulk rule restarted a Bulk on a full
battery as soon as the BMS came back.
- The guard follows the can_be_combined rules: isnan() or a comparison
for sensors, has_state() for binary sensors. It reads the live
var_to_combine_bms_counter rather than bms_combined, which STEP 2 only
publishes once per round.
- The inner "At least one BMS combined" check is removed: the guard is
now the single test. CVL, DVL, CCL, DCL and Requested Force Charge
move up one level.
- A new else branch suspends the logic: var_charge_status keeps its
value, the instructions and requested values are cleared for Home
Assistant, and var_initialized is set to false.
- The end of STEP 3 no longer tests bms_combined and total_voltage,
already guaranteed by the guard.
This fixes the dropout case of #343. A BMS that blocks charging while
combined still goes through Wait.
Charging_logic documents the BMS dropout behaviour, Design_decisions the
guard and its else branch.
Refs #343
The CAN and PYLON links only send data while var_initialized is true and
at least one BMS is combined. The LIB link only checked its protocol, so
it kept answering the inverter during a boot or a BMS dropout, and its
read_lambdas converted the NaN values to integers, which is undefined.
The 100 ms interval now moves the Modbus server to address 248, the
mechanism already used for Disabled, until YamBMS is initialized. The
status mirroring still follows the protocol only: an active link left
silent serves no request, its Status goes false and raises the fault,
like the other links during a dropout.
Design_decisions documents the second condition.
The BMS condition tested most sensors with has_state(), which ESPHome sets
on every publication, NaN included. A BMS that had published NaN once on a
mandatory sensor (for example the PACE power template, which returns NaN
when the current is unknown) stayed combinable, and the NaN corrupted the
totals that drive the inverter.
- Sensors are tested with !std::isnan(): a sensor's state starts at NaN,
so it also covers a sensor that never published.
- cell_ovp and cell_uvp use > 0, like total_voltage and battery_capacity.
JK, KS and PACE packages declare them as a number, whose state starts
at 0, so isnan() alone would combine the BMS before its protection
settings are read.
- Binary sensors keep has_state(), a bool cannot be NaN.
The shunt condition only checked the switch and online_status. It now
also checks the four values the combiner reads: voltage > 0, and current,
power and soc with isnan(). A combined shunt replaces the BMS values, so a
NaN there reached the inverter directly.
Both conditions move from the binary sensor lambda to STEP 1, on the
device's turn, and are published to "Can be combined". A template binary
sensor with a lambda runs it on every loop, about 60 times per second per
device, for a value read once per round.
Design_decisions documents which test applies to which entity type, that
every entity in the conditions is mandatory, and why they are evaluated in
STEP 1.
The binary sensor lambda was evaluated on every loop, including while no
BMS was combined (boot, BMS dropout). The SoC was NaN then, and
`int soc = NaN` is undefined: the request could turn on, and with a real
SoC between Start and Stop it stayed on until Stop SoC once the packs came
back.
The rule now runs in STEP 3, inside the "At least one BMS combined" block,
and publishes the sensor. While no BMS is combined it is not evaluated, so
the request keeps its last state. The SoC is read as a float: a NaN fails
both comparisons and keeps the current state too. The "Request force
charge" switch clears the request at once with an on_turn_off, even while
no BMS is combined.
Reported in #346, first fix proposed in #347.
Update EG4 LL-V2 component to v1.1.1 (builds on ESPHome 2026.11)
ESPHome 2026.11 removed format_hex_pretty(), which v1.1.0 used in its frame
logs, so every EG4 LL-V2 config failed to compile on dev:
'format_hex_pretty' was not declared in this scope. v1.1.1 uses its own
formatter (same output) and changes nothing else.
Checked with the EG4 LL-V2 example (3 BMS, ESP32) on ESPHome 2026.11.0b3.
ESPHome 2026.11 includes esphome#21605: a default enable pin that is used
elsewhere in the config is dropped automatically. The model's ch422g pin 2
no longer conflicts with backlight_output, so the overrides added for
2026.10 are no longer needed. The resolved enable_pin is unchanged: ch422g
pin 6 on the 7", none on the 4.3 and 4.3B.
ESPHome 2026.11 makes `relation` a required option for every entry under
`esphome: devices:`, and 2026.10 rejects that key. Both changes have to
land together, so raise min_version to 2026.11.0 in the same commit.
Use `relation: via` on all ten device declarations (BMS, sniffer, shunt,
balancer, Deye stack, board, YamBMS instance, CAN and RS485 links). It is
the value the API assumed before the key existed, so Home Assistant keeps
showing the devices exactly as before. `child` would fit the board, the
YamBMS instance and the inverter links better, but it is left for later:
a Home Assistant release that reads the field without supporting `child`
drops those devices and their entities.
Docs: ESPHome 2026.11.0 in README and Installation_procedure (which still
said 2025.11.0), Design_decisions no longer equates min_version with the
flow_control requirement, and Coding_conventions documents the
`relation: via` rule.
- Hub `battery_charging_power` / `battery_discharging_power` left the unused sign as NAN, while the shunt already publishes 0 W.
- ESPHome `total_daily_energy` (`method: right`) skips NAN without advancing `last_update_`, so the next finite watt is multiplied by the whole gap (for example a charge spike after a long discharge).
- Publish 0 W on the unused sign (and when power is NAN / no BMS is combined) so both daily meters keep integrating.
Auto EOC assumed daylight charging: the target was always today and the
target hour was limited to 12-23, so a night window could not be planned.
- New Auto EOC Start Hour/Minute define the charging window from the
start time to the next target time. It may cross midnight
(e.g. 22:00 -> 06:00 for grid charging); start = target is 24h.
- Target hour can be set from 0 to 23.
- Outside the window the status is "Wait: Starts at hh:mm" instead of
"Stop: Target time passed". The 1h grace period is unchanged and has
priority over a window starting within it.
- Times are local and DST safe.
- Default start 00:00 keeps the previous daylight behaviour.
- Dashboards, docs and changelog updated.
Daily Charging/Discharging Energy (YamBMS and per BMS) were published
with 1 Wh resolution. Home Assistant records every float change, so a
new state was written every few seconds while charging or discharging.
- Add a round: 2 filter and set accuracy_decimals to 2 (0.01 kWh).
- bms_base_daily_energy 1.1.4, changelog updated.
yambms_canbus.yaml and the Deye top packages now import their node from
canbus_platform (esp32_can, mcp2515 or external). canbus_bitrate replaces
esp32_canbus_bitrate and mcp2515_canbus_bitrate. Breaking change.
Each package now imports its UART from its *_uart_id var and keeps its own baud
rate key. WK2168 channels work the same way, uart_flow_control_pin replaces the
flow control include, and min_version moves to 2026.10.0. Breaking change.
Rename the inverter registry to yambms_brand_registry.yaml and add the new brands.
yambms_rs485.yaml becomes the file to include, with a rs485_protocol var that
selects PYLON or Voltronic LIB.
Added RS485 Voltronic LIB protocol
Experimental support for Voltronic Power's own Modbus RTU protocol
(YB_PROTO_RS485_VOLTRONIC_LIB), distinct from Pylontech and confirmed by
an independent Epever cross-reference (PRO=26, same document authors).
Implemented natively via ESPHome's modbus_server rather than an external
component, since it's plain Modbus RTU unlike Pylontech's own framing.
Voltronic (Axpert/InfiniSolar) and MPP Solar share this protocol and are
added to both inverter brand selects - confirmed identical by MPP Solar's
own manual. Required splitting the RS485 entry point the other way round
(yambms_rs485_pylon.yaml/yambms_rs485_voltronic.yaml now include the
shared yambms_rs485.yaml, not the reverse) so a node can run a different
protocol on each RS485 link.
Scope is deliberately reduced to what the inverter firmware actually
honors: per Voltronic's own documentation only the charge voltage limit
is applied, so Auto CCL Current Taper and Auto Float have no effect
through this link - accurate SOC/telemetry and charge/discharge
enable/disable are the real value here. Unverified on real hardware.
BREAKING CHANGE: both inverter link selects are renamed, so their stored value is
reset. The link stays inactive until an inverter brand is selected. See
documents/README/changelog/Changelog_Inverter_brand_and_protocol.md
New `Inverter brand` select (16 brands) and reworked `Protocol` select, now
defaulting to `Automatic`. Selecting the brand is enough, the protocol follows;
an explicit protocol still takes priority over the brand.
The protocol is resolved once, at boot and on every select change, into
`canbus${canbus_id}_active_protocol` / `rs485${rs485_id}_active_protocol`.
Everything else reads that integer instead of dispatching on `active_index()`,
where `== 5` meant LuxPower purely by convention of the option order.
New shared `yambms_inverter_registry.yaml`: protocol dictionary (`YB_PROTO_*`),
brand to protocol mapping, and the battery mode and note of each couple.
Removed the `YamBMS name` select: the manufacturer name sent on CAN frame 0x35E
now derives from the protocol in use, which is what `Automatic` already did.
Removed the `canbus_extended_ack` substitution: both the 11-bit and the 29-bit
ACK triggers are registered, so the Schneider XW Pro needs no configuration.
Renamed CAN `PYLON 1.2` to `PYLON V1` and RS485 `Pylontech` to `PYLON`.
New per-link diagnostics `Inverter link protocol`, `Inverter battery mode` and
`Note`, with a markdown card in the dashboards, alongside a system fault card.
Telemetry: `comm_bus` / `comm_protocol` replaced by `inverter_brand`,
`inverter_bus`, `inverter_protocol` and `inverter_protocol_source`, one slot per
declared link instead of a single value overwritten by the last one.
RS485 packages split: `yambms_rs485.yaml` is the entry point carrying the selects,
`yambms_rs485_pylon.yaml` the protocol implementation. The baud rate is applied
with `set_baud_rate()` + `load_settings()` instead of extending the uart
component, so boards using a UART expander no longer need their own include.
Fixes:
- the CAN bus kept re-emitting the last frame every 100 ms when the protocol was
set to `Disabled` at runtime
- the RS485 link kept answering the inverter with stale data on `Disabled`, the
proxy sensors it reads are now invalidated
- a `Disabled` link no longer lights the fault LED, it is unregistered from the
fault registry instead of being reported as failing
- the reported bus and protocol were overwritten when a node declares several
inverter links
- changing the protocol restarts the CAN frames immediately instead of waiting up
to 30 s for the next retry tick
* Fix Deye power update interval
* Keep batteries the report CCL/DCL 0A
A battery that reports a charge limit (CCL) or discharge limit (DCL) of 0 A now stays in the combine. Before, a full Deye at 0 A CCL, or an empty one at 0 A DCL, dropped out of capacity, SoC and the totals.
- Missing values are still caught: a CCL or DCL with no value yet still fails >= 0, because comparisons with NaN are always false.
- No effect on the limits: CCL and DCL are added up, so a battery at 0 A adds 0 A to the total.
- All BMS models are affected
https://github.com/Sleeper85/esphome-yambms/issues/335
ESPHome 2026.10 fails to validate the Waveshare ESP32-S3 Touch-LCD 4.3,
4.3B and 7 boards with "Pin 2 is used in multiple places". The mipi_rgb
models now set ch422g pin 2 (backlight) as a default enable_pin, and
the board already uses that pin for backlight_output, which drives the
backlight light used by the LVGL designs to turn the screen off and on.
- Override enable_pin to leave out pin 2, so the backlight stays under
light control: pin 6 only on the 7 board, none on the 4.3 and 4.3B.
- This matches what esphome/esphome#21605 will do automatically. The
override can be removed once min_version includes that change.
Near the top of charge the Auto CCL curve is steep (about 3.5 A per mV
at 3.46 V/cell). The max cell voltage arrives only every 10-15 s in
1 mV steps and moves a few mV with the charge current. Each new reading
moved the target by 10-20 A. Cuts are applied at once and increases
ramp up, so the requested CCL swung between about 8 A and 45 A every
20-40 s.
- Smooth the max cell voltage used for the curve with a time-based
moving average (auto_ccl_max_cell_v_tau, default 30 s, '0' disables).
- Safety guard: a raw reading more than auto_ccl_max_cell_v_guard
(default 5 mV) above the average is used instead (minus the guard),
so real voltage rises still cut the current at once.
- Add auto_ccl_min_current (default 1 A): Auto CCL never requests less,
also above the end of its curve or with an invalid float/OVP setting.
Other limits can still request 0 A.
Several sensors had a device_class that did not match their unit, so
Home Assistant shows warnings and handles them wrongly (unit
conversion, statistics).
- Power sensors in W used device_class 'current'; now 'power'
(BASEN RS485, DEYE CAN module full/minimal, FAKE).
- Ah sensors had a device_class that does not accept Ah ('battery',
'energy', 'energy_storage'). Removed it, since Home Assistant has no
device_class for Ah (BASEN RS485, DEYE CAN module/top full/minimal,
JK RS485 Display, Modbus client).
- DEYE battery capacity used state_class 'total_increasing', but the
value is not a counter. Changed to 'measurement'.
- update and telemetry are now gated independently by substitution;
var_service and its Update service switch are removed
- the uptime text sensor is published by its source instead of polling
it, which fixes the 24855d readings that reached the telemetry, and
the raw seconds are now sent instead of the formatted string
- the MAC address is replaced by a salted SHA-256, derived identically
server side so no pairing window is needed
bms_base_charging_cycles.yaml coerced a NaN raw reading to 0 before adding
the user offset, instead of letting NaN propagate like the sensors fixed
in dee203e4 ("Sensors published to NAN when no BMS is combined"). *_raw is
NaN until the first trusted BMS frame arrives after a reboot, so both
`charging cycles` and `total charging cycle capacity` published a literal
0 during that transient - with `state_class: total`, that 0 also landed
in Home Assistant's long-term statistics.
Fix is to drop the two `if (isnan(...)) = 0;` coercions and let
`NaN + offset == NaN` propagate, so both sensors go unavailable through
the transient instead of reporting 0.
Both sensors also moved from `or: [throttle: 10s, delta: 1]` to the
NaN-safe rate-limit filter already used throughout yambms_core.yaml, since
the built-in `delta` filter drops a NaN transition without updating its
reference and would otherwise freeze the sensor on its last value for up
to 10s.
That filter is extracted from yambms_core.yaml into
packages/base/device_base.yaml, which every node loads via its board_*.yaml
regardless of whether it runs the YamBMS engine - unlike yambms_core.yaml,
which is absent from a multi-node Modbus-server node that only exposes
BMS/Shunt packages. Renamed yambms_rate_limit_filter to rate_limit_filter
now that it is no longer engine-specific.
Some BMS balance their cells but never expose a balancing flag, so
`bms_equalizing` stays false and the core cannot tell a pack that is still
balancing from one that has finished. This is not cosmetic : while
equalizing is true, yambms_core.yaml stops the Cut-Off timer and lets the
charge run to the EOC timer instead of terminating early.
bms_options_fake_equalizing.yaml infers that flag from the pack itself. No
absolute cell voltage is hardcoded : the anchor is bulk_voltage / cell
count, the same derivation as cell_bulk_v in yambms_core.yaml, so it
follows `yambms_battery_chemistry`, the cell count and the configured bulk
voltage automatically.
START when BOTH are true
max cell >= cell_bulk_v the pack is at the setpoint
AND (max - min) >= trigger voltage its own balancing threshold
STOP when EITHER is true
max cell < cell_bulk_v - hysteresis the pack dropped off the setpoint
OR (max - min) < trigger - delta hyst. the spread closed back below it
Only two deltas and one offset are configurable, and none of the three
depends on the chemistry - LFP, Li-ion and LTO all want the same few tens
of mV. The absolute anchor they hang off comes from the core, for free.
The delta condition is what keeps this honest : a pack that reaches the
setpoint perfectly balanced has nothing to equalize, so it reports false
and the Cut-Off timer does its job. A plain voltage comparison would report
balancing forever and terminate every charge on the EOC timer.
It extends bms<id>_bms_equalizing, the raw BMS flag, and not the combined
bms<id>_equalizing sensor. bms_base_balancer.yaml is therefore neither
modified nor duplicated, and keeps giving an external balancer priority
whenever one is online : the inference only applies when no balancer
reports for this pack.
This commit only adds the package. Nothing includes it yet, so no existing
configuration changes behaviour. Candidates sharing the same case are
Seplos V3, Seplos V1/V2, EG4 LL V2 and JK RS485 DISPLAY, whose
bms_equalizing is a hardcoded `return false;`.