Restore DC charger control compatibility (v1.2.7.1) - #404
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6b889961e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR restores DC charger controls on devices that do not expose the optional running-state register and ensures integration-hidden controls return after upgrading.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the current support result is explicitly true for dependency-free controls, and both registry reconciliation paths can restore entries previously hidden by the integration. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[DC control description] --> B{Register dependencies}
B -->|Explicit empty tuple| C[Structurally supported]
C --> D[Restore integration-hidden registry entry]
D --> E{Running-state register available?}
E -->|Yes| F[Use running state]
E -->|No| G[Use responding DC telemetry]
F --> H[Determine runtime availability and switch state]
G --> H
Reviews (2): Last reviewed commit: "Restore integration-hidden DC controls" | Re-trigger Greptile |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
31513offfor a valid Idle state31513is unavailable, use other responding DC telemetry for command availability and use output power as the deprecated switch's legacy state fallbackhidden_by=integration1.2.7.1Root cause
PR #398 in v1.2.7 added
register_support_keys=("dc_charger_running_state",)to the deprecated DC switch and both DC command buttons. When a charger does not expose register31513, the new unsupported-register lifecycle hides and unloads all three controls even though their command register is a separate write-only register. The deprecated switch's availability function also treated the valid Idle value (0x00) as unavailable instead ofoff.An explicit empty dependency tuple now represents controls backed only by a write-only register and is treated as structurally supported. This allows registry entries hidden by v1.2.7 to be restored while preserving user-hidden entries. Runtime availability remains telemetry-based, unsupported-register filtering remains active for raw sensors and other entities, and missing Modbus data is not converted into a false Idle sensor value.
Validation
ast.parseTrue/False/Nonesupport behavior remains unchangedmanifest.jsonversion1.2.7.1git diff --checkAddresses #403