Skip to content

Add sensor disable controls to the statistics interface - #3

Merged
FortranFour merged 1 commit into
mainfrom
feature/statistics-disable-controls
Oct 25, 2026
Merged

FortranFour merged 1 commit into
mainfrom
feature/statistics-disable-controls

Conversation

@FortranFour

Copy link
Copy Markdown
Owner

The statistics interface previously required administrators to leave the panel and disable both entities manually. This adds a Disable both sensor entities action for a reviewed pair that otherwise passes the statistics checks.

The action uses Home Assistant's entity registry API for only the two selected entities, preserves existing disable reasons, and never disables a whole device, removes states, or reloads integrations. The panel shows entity readiness, briefly polls for actual unloading, and provides Refresh status when unloading is delayed. Transfer stays blocked until both entities are disabled and unloaded and has its own fresh review and backup confirmation.

The disable action is administrator-only, session-bound, expiring, single-use and revalidates sensor identities and statistics before either registry write. Existing destination statistics are rejected before offering to disable anything. Partial registry failures are reported without claiming success or retrying blindly. Configuration Restore does not undo entity disabling.

Validation: 106 standalone Python tests, six real Home Assistant 2026.3.0 recorder tests, frontend unit tests, desktop/mobile Chromium workflows and overflow checks at 1360px and 390px, JavaScript syntax and package validation all passed locally. Real recorder coverage confirms companion entities are unchanged, loaded states are never forcibly removed and transfer remains gated until unload.

Updates the version and prerelease request to v1.2.1. On merge, the existing prerelease-only workflow reruns checks and publishes the ZIP/checksums with --prerelease --latest=false. The measurement-only limitations remain; this does not add merging or energy-counter support. Related to #1, which remains open.

@FortranFour
FortranFour merged commit 9ca7c97 into main Oct 25, 2026
4 checks passed
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