Add Panasonic Window Air Conditioner (Hong Kong/Macau) integration#172642
Add Panasonic Window Air Conditioner (Hong Kong/Macau) integration#172642sam0737 wants to merge 1 commit into
Conversation
New `panasonic_window_ac_hk` integration controlling Panasonic window / through-the-wall air conditioners sold in Hong Kong and Macau (CW-HU / CW-HZ / CW-SU / CW-SUL families) over the `infrared` platform. - Config flow selects an infrared emitter entity and names the unit. - Climate entity (modes, 0.5 C target temperature, fan, swing), a nanoeX switch, and Quiet/Powerful buttons share assumed state via runtime_data. - Pure-Python protocol encoder (reverse-engineered, verified on a CW-HU70ZA) emits infrared_protocols Command timings. - Bronze quality scale; tests cover the config flow, setup/unload and all platforms. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
When adding new integrations, limit included platforms to a single platform. Please reduce this PR to a single platform. See the review process for more details.
joostlek
left a comment
There was a problem hiding this comment.
Hello 👋🏻,
Thank you for opening a PR. A few things to keep in mind:
- The initial PR should only have a single platform
- Device specific logic should exist on a library hosted on PyPI
I'm new to home-assistant project, I guess you want me to refactor the IR logic out from here, and create a PR for https://github.com/home-assistant-libs/infrared-protocols, right? And then I should make 3 separated PR to integrate that into Climate/Switch/Button platform. Am I right? |
Breaking change
Proposed change
Adds a new integration,
panasonic_window_ac_hk, to control Panasonic window / through-the-wall air conditioners sold in Hong Kong and Macau (the CW-HU, CW-HZ, CW-SU, and CW-SUL families) over the existinginfraredplatform.Product page of Panasonic HK: https://www.panasonic.hk/en/categories/living/ventilation-air-conditioning/window-air-conditioner/
Because infrared is one-way (fire-and-forget, no feedback channel), the integration uses assumed state and restores the last known state across restarts via
RestoreEntity. The IR frames are built from a description of the reverse-engineered Panasonic CW protocol (~38 kHz carrier, pulse-distance, LSB-first; 27-byte full state frame plus short Quiet/Powerful frames).It provides the following entities, grouped under a single device:
The integration requires an existing
infraredemitter entity (for example, an ESPHome device with an IR LED) and is configured via the config flow by selecting that emitter. Targets the Bronze quality scale. Reverse-engineered and verified on a CW-HU70ZA controlling a real unit.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:
Made with Cursor