Skip to content

[codex] Gate optional controls and format version sensors - #28

Merged
fboundy merged 1 commit into
mainfrom
patch
Jul 3, 2026
Merged

fboundy merged 1 commit into
mainfrom
patch

Conversation

@fboundy

@fboundy fboundy commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Default generator support to off in config and option fallback handling.
  • Gate generator and AC-coupling switch entities behind their config-flow feature toggles.
  • Mark register-backed configuration/control entities as Home Assistant configuration entities.
  • Display DSP and HMI version registers as hex strings.
  • Regenerate known sensor snapshots after removing default optional switch entities.

Validation

  • python -m uv run pytest -q -> 330 passed, 27 existing warnings
  • python -m uv run ruff check custom_components tests -> clean
  • python -m uv run ruff format --check custom_components tests -> clean

Notes

.github/FUNDING.yml has an unrelated local modification and is intentionally excluded from this PR.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@fboundy
fboundy marked this pull request as ready for review July 3, 2026 22:22
@fboundy
fboundy merged commit cc76e6f into main Jul 3, 2026
7 checks passed
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

fboundy added a commit that referenced this pull request Jul 3, 2026
Follow-up to the EntityCategory work in #28: introduces a "control"
flag on sensor/switch/select/time entity definitions so genuine
operational controls (storage-mode bits, TOU V2 enable switches, TOU
V2 SOC/current/voltage/time entities, Work Mode select, the active-
protocol select) stay in the default category instead of being
lumped into EntityCategory.CONFIG alongside one-time settings.

Also renames storage-mode switch bits to a shorter "Mode - X" scheme,
disables two rarely-used bits (Battery Forcecharge Peakshaving,
Battery Current Correction) by default, and unifies TOU V2 entity
names to "Timed Charge {field} N" (N=1-6 charge slots, 7-12 discharge
slots), mirroring how V1 TOU already uses "Time-Charging" as an
umbrella term for both directions.

A new _apply_control_metadata() helper in hybrid_sensors.py tags and
renames entities by register instead of hand-annotating each dict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant