The "Constant Voltage" and "Constant Current" binary_sensors both read bit 0 of holding register 17. CV uses filters: invert:, CC does not — so they're guaranteed to flip in lock-step (one ON ↔ the other OFF, always). Two HA entities for one underlying state.
This makes dashboards awkward (which one to show?) and template automations slightly off (is_state('cv', 'on') and is_state('cc', 'off') is a tautology).
Proposing a small backward-compatible improvement: add a single Regulation Mode text_sensor that publishes the literal string "CV" or "CC" from the same bit. Keep both legacy binary_sensors so existing dashboards / automations don't break.
PR follows. Found while peer-reviewing the YAML — happy to drop this if you prefer to leave it.
The "Constant Voltage" and "Constant Current" binary_sensors both read bit 0 of holding register 17. CV uses
filters: invert:, CC does not — so they're guaranteed to flip in lock-step (one ON ↔ the other OFF, always). Two HA entities for one underlying state.This makes dashboards awkward (which one to show?) and template automations slightly off (
is_state('cv', 'on') and is_state('cc', 'off')is a tautology).Proposing a small backward-compatible improvement: add a single
Regulation Modetext_sensor that publishes the literal string"CV"or"CC"from the same bit. Keep both legacy binary_sensors so existing dashboards / automations don't break.PR follows. Found while peer-reviewing the YAML — happy to drop this if you prefer to leave it.