This project is maintained in my free time. A coffee ☕ is always appreciated!
Together with PanaAC_v2_ESPHome, this custom integration is part of second generation of PanaAC_ESPHome. It addresses the earlier UI limitation of separate fan-level, vertical-swing, and horizontal-swing selects:
-
PanaAC v1 exposes separate fan-level, vertical-swing, and horizontal-swing selects alongside the climate entity in the ESPHome device.
-
PanaAC v2 combines those controls in the climate entity through the
PanaAC_v2_HAintegration, providing a cleaner climate-card UI. The native(v1)climate and selects remain available by default; in v2 MQTT mode, sethide_legacy_comps: trueto hide them from Home Assistant and use only the PanaAC v2 climate entity.
This is an MQTT-driven custom integration that exposes a Panasonic AC controller (built with
PanaAC_v2_ESPHome) as a
native Home Assistant ClimateEntity.
In this workspace, the custom PanaAC v2 repositories now live under
panaac_v2/, and the consolidated shared test workspace is
../PanaAC_v2_Testing.
This integration intentionally avoids the ESPHome native API and the limited
climate_ir fan/swing enums. Instead it uses plain MQTT topics, so the climate
card can show the full Panasonic fan levels (Auto, Level 1..5, Quiet),
vertical swing positions (Auto, Highest, High, Middle, Low, Lowest),
and a separate horizontal swing axis (Auto, Left Max, Left, Middle,
Right, Right Max).
The ESPHome device publishes:
<topic_prefix>/availability—online/offline(retained)<topic_prefix>/traits— supported modes, ranges, temp step (retained)<topic_prefix>/state— current mode, target temp, fan, swing, horizontal swing (retained)
The integration subscribes to those topics and publishes commands to:
<topic_prefix>/set
Command payloads are partial JSON, e.g. {"fan_mode": "Level 2"}. The device
applies only the supplied fields.
- Ensure HACS is installed.
- Open HACS and go to Integrations.
- Click the menu (⋮) and select Custom repositories.
- Add
https://github.com/hoangminh1109/PanaAC_v2_HAwith category Integration. - Install PanaAC v2 (MQTT).
- Restart Home Assistant.
- Add the integration via Settings → Devices & Services → Add Integration → PanaAC v2 (MQTT).
- Enter the MQTT topic prefix configured in the ESPHome YAML
(
panaac_v2/esphome-panaac-v2by default).
- Make sure the Home Assistant MQTT integration is configured and pointed at the same broker used by the ESPHome device.
- Copy or symlink
custom_components/panaac_v2/into your Home Assistantconfig/custom_components/directory. - Restart Home Assistant.
- Add the integration via Settings → Devices & Services → Add Integration → PanaAC v2 (MQTT).
- Enter the MQTT topic prefix configured in the ESPHome YAML
(
panaac_v2/esphome-panaac-v2by default).
custom_components/panaac_v2/
__init__.py — entry setup, forwards to climate platform
climate.py — the ClimateEntity + MQTT subscriptions
config_flow.py — config flow (topic prefix)
const.py — domain and config keys
manifest.json — integration metadata
strings.json — UI strings
translations/en.json
- The integration depends on the built-in
mqttintegration ("dependencies": ["mqtt"]). - Trait messages are retained, so the climate card gets the correct supported modes shortly after HA starts even if the device is currently quiet on the state topic.
The entity exposes hvac_action, so the climate building-block triggers and
conditions work (started_cooling, is_cooling, …). These follow the current
Home Assistant YAML style — triggers:/conditions:/actions: lists with
trigger:/condition:/action: keys (the modern names for the legacy
platform:/service:). Replace climate.living_room with your entity id.
Trigger — thermostat started cooling
triggers:
- trigger: climate.started_cooling
target:
entity_id: climate.living_room
options:
behavior: each # each | first | all (default each)
for: "00:00:00" # fires immediately by defaultCondition — thermostat is cooling (gated behind a state change)
triggers:
- trigger: state
entity_id: climate.living_room
attribute: hvac_action
to: cooling
conditions:
- condition: climate.is_cooling
target:
entity_id: climate.living_room
options:
behavior: any # any | all (default any)Actions — set mode, target temperature, fan, swing
actions:
- action: climate.set_hvac_mode
target:
entity_id: climate.living_room
data:
hvac_mode: cool # off | cool | heat | fan_only | dry | auto
- action: climate.set_temperature
target:
entity_id: climate.living_room
data:
temperature: 24
hvac_mode: cool # optional; keeps the current mode if omitted
- action: climate.set_fan_mode
target:
entity_id: climate.living_room
data:
fan_mode: "Level 2" # Auto | Level 1..5 | Quiet | Powerful
- action: climate.set_swing_mode
target:
entity_id: climate.living_room
data:
swing_mode: Middle # Auto | Highest | High | Middle | Low | Lowest
- action: climate.set_swing_horizontal_mode
target:
entity_id: climate.living_room
data:
swing_horizontal_mode: Left # Auto | Left Max | Left | Middle | Right | Right Maxturn_on / turn_off / toggle take only target: (no data:) and appear
once the device advertises more than one HVAC mode that includes off.
DESIGN.md— architecture, MQTT topic contract, HA entity design.INSTALL.md— step-by-step installation, broker setup and troubleshooting.
- This PanaAC v2 project is vibe coded with the help of AI Agents (Codex & Claude), using various models cross checked each other - gpt 5.5, gpt 5.6, opus 4.6, glm 5.2, minimax-m3, kimi-k2.7-code).