Skip to content

[mitsubishi_cn105] use HEAT_COOL mode to enable temperature slider#15748

Merged
swoboda1337 merged 2 commits into
esphome:devfrom
crnjan:bugfix/mitsubishi_cn105_mode
Apr 16, 2026
Merged

[mitsubishi_cn105] use HEAT_COOL mode to enable temperature slider#15748
swoboda1337 merged 2 commits into
esphome:devfrom
crnjan:bugfix/mitsubishi_cn105_mode

Conversation

@crnjan
Copy link
Copy Markdown
Contributor

@crnjan crnjan commented Apr 15, 2026

What does this implement/fix?

Changes AUTO mode as defined by Mitsubishi to match HA definition - HEAT_COOL.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — policy
  • Developer breaking change (an API change that could break external components) — policy
  • Undocumented C++ API change (removal or change of undocumented public methods that lambda users may depend on) — policy
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

Pull request in esphome-docs with documentation (if applicable):

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040/RP2350
  • BK72xx
  • RTL87xx
  • LN882x
  • nRF52840

Example entry for config.yaml:

# no changes

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@github-actions
Copy link
Copy Markdown
Contributor

To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file:

external_components:
  - source: github://pr#15748
    components: [mitsubishi_cn105]
    refresh: 1h

(Added by the PR bot)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.42%. Comparing base (f59a101) to head (a0c32b1).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #15748   +/-   ##
=======================================
  Coverage   76.42%   76.42%           
=======================================
  Files          58       58           
  Lines       12643    12643           
  Branches     1772     1772           
=======================================
  Hits         9662     9662           
  Misses       2556     2556           
  Partials      425      425           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

Memory Impact Analysis

Components: mitsubishi_cn105
Platform: esp8266-ard

Metric Target Branch This PR Change
RAM 29,488 bytes 29,488 bytes ➡️ +0 bytes (0.00%)
Flash 276,795 bytes 276,731 bytes 📉 ✅ -64 bytes (-0.02%)
📊 Component Memory Breakdown
Component Target Flash PR Flash Change
[esphome]mitsubishi_cn105 4,363 bytes 4,302 bytes 📉 ✅ -61 bytes (-1.40%)
🔍 Symbol-Level Changes (click to expand)

Changed Symbols

Symbol Target Size PR Size Change
esphome::mitsubishi_cn105::MitsubishiCN105Climate::traits() 205 bytes 144 bytes 📉 -61 bytes (-29.76%)

Note: This analysis measures static RAM and Flash usage only (compile-time allocation).
Dynamic memory (heap) cannot be measured automatically.
⚠️ You must test this PR on a real device to measure free heap and ensure no runtime memory issues.

This analysis runs automatically when components change. Memory usage is measured from a representative test configuration.

@crnjan crnjan marked this pull request as ready for review April 15, 2026 13:15
Copilot AI review requested due to automatic review settings April 15, 2026 13:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Mitsubishi CN105 climate component to represent the unit’s built-in “AUTO” (auto-changeover) mode as Home Assistant’s HEAT_COOL mode so HA will allow setting a single target temperature via the UI.

Changes:

  • Remap MitsubishiCN105::Mode::AUTO from CLIMATE_MODE_AUTO to CLIMATE_MODE_HEAT_COOL.
  • Refactor traits() to derive supported HVAC/fan modes directly from the mode maps (avoids duplicating lists).

Comment thread esphome/components/mitsubishi_cn105/mitsubishi_cn105_climate.cpp
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Apr 15, 2026

Thanks @crnjan

@swoboda1337 swoboda1337 merged commit b40ffac into esphome:dev Apr 16, 2026
38 of 39 checks passed
@crnjan crnjan deleted the bugfix/mitsubishi_cn105_mode branch April 16, 2026 19:15
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AUTO Mode Change in ESPHome Breaks Millions of cn105 units built in control

6 participants