fix(appliances): route enumeration at Haier's new unified-api endpoint - #8
Merged
Conversation
Haier migrated appliance enumeration off the legacy /commands/v1/appliance
REST endpoint around 2026-06-20. For migrated accounts that endpoint now
returns 200 with an empty {"payload":{"appliances":[]}} body, so every
device shows up as unavailable in Home Assistant — pyhon-revived 0.18.3
still calls the legacy path in HonAPI.load_appliances.
Monkey-patch load_appliances to query the endpoint the hOn app now uses,
{API_URL}/unified-api/v1/view/appliance-list, which returns the same
records. The response envelope is undocumented, so list extraction probes
the plausible shapes and logs the raw keys if none match, instead of
silently returning nothing.
Stopgap until the fix lands upstream in pyhon-revived.
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
Around 2026-06-20 Haier migrated appliance enumeration off the legacy
/commands/v1/applianceREST endpoint that pyhon-revived 0.18.3 calls inHonAPI.load_appliances. For migrated accounts that endpoint now returns200with an empty{"payload":{"appliances":[]}}body, so every Haier device shows up as unavailable in Home Assistant.Independently confirmed in mmalolepszy#48 — same day, same symptom, same new endpoint (discovered by intercepting the hOn app):
https://api-iot.he.services/unified-api/v1/view/appliance-list.What
appliance_list_patch.pymonkey-patchesHonAPI.load_appliancesto query the new endpoint;__init__.pyapplies it on import.Stopgap until the fix lands upstream in pyhon-revived.
Ref: mmalolepszy#48
🤖 Generated with Claude Code