Skip to content

Two binary_sensors for one bit: CV / CC are tautologically opposite #15

@malaiwah

Description

@malaiwah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions