Add Mitsubishi WF-RAC integration - #181403
Open
blues-sechseck wants to merge 16 commits into
Open
Conversation
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.
Proposed change
New integration for Mitsubishi Heavy Industries air conditioners fitted with the WF-RAC wireless LAN module (sold under that part number, marketed together with the Smart M-Air app). It talks to the module over the local network using the same HTTP API the app uses — no manufacturer account, no outbound connection,
local_polling.Cut back after the first review. @joostlek asked for a smaller first PR with diagnostics and the reconfigure flow split off, and this is that PR. Diagnostics, the reconfigure step and the options dialog are gone;
quality_scaleis bronze. What is left is the integration proper: theclimateplatform, the coordinator, a config flow with manual, discovery and zeroconf steps, and the migration chain. The removed pieces come back as their own PRs, along with the seven further platforms the custom component has.Four things worth flagging before review:
pywfracholds everything that builds and parses the module'sairconStatframes. It takes an injectedaiohttpsession and an explicit certificate path rather than reaching intohass, is fully typed, and has its own test suite. Pinned at0.1.3; this PR moves it up from0.1.0(diff). The three steps redact the operator and device ids from debug logs, refuse a fan value the protocol cannot encode instead of silently sending an empty nibble, and name the field when they do.mitsubishi_wf_rac, next to the existingmelcloud. Those are two different manufacturers:melcloudis Mitsubishi Electric, this is Mitsubishi Heavy Industries, with an unrelated protocol and no shared hardware.async_migrate_entryandVERSION = 7are included even though core has no old entries of its own. The domain matches the custom component's, so an installation that switches over carries config entries of versions 1–6 with it, and those would fail to load without the migration. The last two steps are v5 → v6, which moves the host fromoptionsback intodatawhere the discovery helper that refreshes a changed address actually writes it, and v6 → v7, which registers the airco id as the entry's unique id so a moved unit is recognised rather than offered as a new discovery.ac_cert.pemis present in the configuration directory the integration pins it; without it the connection falls back to a permissive SSL context.const.pycarries the filename and theopensslrecipe that produces it.On which models this covers: the WF-RAC module is the common part, not the indoor unit. It is an accessory fitted to Mitsubishi Heavy Industries split systems, and the protocol is the module's rather than any one model's — the capability flags in the frame say what the unit behind it can do, so ceiling cassettes and wall units answer the same interface with different capabilities. The documentation page names the models this has been confirmed on.
Verified locally:
python3 -m script.hassfest(all 1,515 integrations, 0 invalid),python3 -m script.gen_requirements_all validate(no diff),ruff checkandruff format,mypy,pylint, andpytest tests/components/mitsubishi_wf_rac— 100 tests, 100 % coverage in every module.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: