fix(appliances): POST the new appliance-list endpoint and parse nested payload - #9
Merged
Merged
Conversation
…d payload
hotfix7 routed enumeration at the new unified-api endpoint but used a GET
with no body and expected a top-level payload.appliances, so the call came
back empty and devices stayed unavailable.
The current app (cross-checked against gvigroux/hon's async_authorize) hits
this endpoint with a POST carrying {"deviceId": ...} and returns the list
nested under modules.applianceList.payload.appliances. Switch to that POST
and parse the nested shape, keeping the legacy/known-key probes as a
fallback. On an empty result, log the HTTP status and a truncated body at
WARNING so any remaining shape/auth mismatch is visible in the HA log.
Ref: mmalolepszy#48
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
hotfix7 routed enumeration at the new unified-api endpoint but used a GET with no body and expected a top-level
payload.appliances, so the call came back empty and devices stayed unavailable (verified live: hotfix7 installed, config entryloaded, 0 appliances, no parse warning).What
Cross-checked the real contract against gvigroux/hon
async_authorize: the current app hits this endpoint with a POST carrying{"deviceId": ...}and returns the list nested undermodules.applianceList.payload.appliances.load_appliancesto that POST and parse the nested shape.Follow-up to #8. Ref: mmalolepszy#48
🤖 Generated with Claude Code