Skip to content

fix(appliances): POST the new appliance-list endpoint and parse nested payload - #9

Merged
Dekkee merged 1 commit into
mainfrom
fix/haier-appliance-list-post
Jun 21, 2026
Merged

fix(appliances): POST the new appliance-list endpoint and parse nested payload#9
Dekkee merged 1 commit into
mainfrom
fix/haier-appliance-list-post

Conversation

@Dekkee

@Dekkee Dekkee commented Jun 21, 2026

Copy link
Copy Markdown
Owner

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 entry loaded, 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 under modules.applianceList.payload.appliances.

  • Switch the patched load_appliances to that POST and parse the nested shape.
  • Keep legacy/known-key probes as a fallback.
  • On an empty result, log HTTP status + truncated body at WARNING so any remaining shape/auth mismatch is visible in the HA log.

Follow-up to #8. Ref: mmalolepszy#48

🤖 Generated with Claude Code

…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>
@Dekkee
Dekkee merged commit 6499893 into main Jun 21, 2026
2 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