Repository navigation
[heatpumpir] Fix fan speeds for mitsubishi_msc protocol - #20460
Jonathan Swoboda (swoboda1337) merged 1 commit into
Conversation
MitsubishiMSCHeatpumpIR only handles FAN_AUTO and FAN_1..FAN_3, so the FAN_2/FAN_3/FAN_4 mapping used for other protocols made Low send Medium, Medium send High and High fall back to Auto. Use FAN_1..FAN_3 for this protocol. Fixes #20429
|
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#20460
components: [heatpumpir]
refresh: 1h(Added by the PR bot) |
|
👋 Hi there! This PR modifies 1 file(s) with codeowners. Rob Deutsch (@rob-deutsch) - As codeowner(s) of the affected files, your review would be appreciated! 🙏 Note: Automatic review request may have failed, but you're still welcome to review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #20460 +/- ##
=======================================
Coverage 93.24% 93.24%
=======================================
Files 90 90
Lines 19643 19643
Branches 3026 3026
=======================================
Hits 18316 18316
Misses 1024 1024
Partials 303 303 🚀 New features to boost your workflow:
|
Memory Impact AnalysisComponents:
📊 Component Memory Breakdown
🔍 Symbol-Level Changes (click to expand)Changed Symbols
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
|
ESPHome Bot (@esphbot) review |
PR Review — [heatpumpir] Fix fan speeds for mitsubishi_msc protocolMerge-ready. This is a small, well-scoped fix for the mitsubishi_msc fan-speed offset, and other protocols keep their current behavior. What the PR does well:
Notes (non-blocking, no findings filed):
Checklist
Automated review by Kōan (Claude) |
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
Confirmed on real hardware! I reported the original issue (#20429) and tested this on the same unit, a Mitsubishi MS09TW on an ESP32-S3, with the fan set from Home Assistant, and it works perfectly. Thanks for the quick fix! |
What does this implement/fix?
With
protocol: mitsubishi_msc, the fan modes from Home Assistant send the wrong speed: Low sends Medium, Medium sends High, and High falls back to Auto.transmit_state()maps Low/Medium/High toFAN_2/FAN_3/FAN_4for every protocol.MitsubishiMSCHeatpumpIR::send()in HeatpumpIR 1.0.42 only has cases forFAN_AUTOandFAN_1..FAN_3(frame values 0x02/0x03/0x05), so everything is shifted up by one andFAN_4hits no case and stays at the Auto default. This change usesFAN_1..FAN_3for that protocol only; every other protocol keeps the current mapping.Tested on the host: I compiled the fan switch from
heatpumpir.cpptogether with the realMitsubishiMSCHeatpumpIR.cpp/HeatpumpIR.cpp/IRSender.cppfrom HeatpumpIR 1.0.42 and decoded the fan bits of the sent frame. Ondev, Low/Medium/High give 0x03/0x05/0x00; with this change they give 0x02/0x03/0x05, which are the values from the reporter's remote capture. Other protocols still getFAN_2/FAN_3/FAN_4. I also built the component test withscript/test_build_components.py -c heatpumpir -t esp32-ard, which passes. I don't have this unit, so it's not tested on hardware.Types of changes
Related issue or feature (if applicable):
Pull request in esphome.io with documentation (if applicable):
Pull request in developers.esphome.io with developer documentation (if applicable):
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: