Skip to content

Keep firmware info when the API omits fields - #456

Open
rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:fix/firmware-partial-info
Open

rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:fix/firmware-partial-info

Conversation

@rhammen

@rhammen rhammen commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #415 for the chargers in #452 and in comments on #448, which omit AvailableVersion and IsUpToDate.
Setup no longer fails with #415, but the charger's firmware info is still skipped, even though CurrentVersion is sent. The firmware entity stays unavailable, and a warning wrongly says the charger isn't initialized.

This PR stores each field on its own, since all three are nullable in the API. An affected charger now shows its installed version, with state unknown when AvailableVersion is missing. A charger with no version info also shows unknown instead of unavailable.

I can't test this on a real charger, as mine still gets all the fields.

🤖 Generated with Claude Code

- Store each firmware field on its own, instead of skipping the charger
- All three are nullable per the Zaptec API; drop the "not initialized" warning

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sveinse sveinse added this to the v0.9.0 milestone Nov 7, 2026
rhammen added a commit to rhammen/zaptec that referenced this pull request Nov 8, 2026
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.

2 participants