fix: inject AUTO fan mode for MH-AC-WIFI-1 devices in _get_fan_map#71
Open
kesawi wants to merge 1 commit into
Open
fix: inject AUTO fan mode for MH-AC-WIFI-1 devices in _get_fan_map#71kesawi wants to merge 1 commit into
kesawi wants to merge 1 commit into
Conversation
MH-AC-WIFI-1 adapters report fan speed states [1,2,3,4] in their
datapoints descriptor, omitting state 0 (auto). No entry in
INTESIS_MAP[67] exactly matches [1,2,3,4], so _get_fan_map() falls back
to key 63 which incorrectly exposes 'max' (5) as a fan option in HA.
The device genuinely supports AUTO fan (uid 4, value 0) even though it
is not advertised in the datapoints descriptor. Inject state 0 for
MH-AC-WIFI devices before the map lookup, correctly matching key 30
{0: auto, 1: quiet, 2: low, 3: medium, 4: high} and removing the
spurious 'max' option.
Fixes jnimmo#69
Tested on MH-AC-WIFI-1 hardware with Mitsubishi Heavy Industries SRK
series units.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Fixes #69
MH-AC-WIFI-1 adapters report fan speed states
[1,2,3,4]in their datapoints descriptor, omitting state0(auto). No entry inINTESIS_MAP[67]exactly matches[1,2,3,4], so_get_fan_map()falls back to key 63 which incorrectly exposes "max" (5) as a fan option in HA — not advertised by the device and may not be supported depending on the connected MHI unit.The device genuinely supports AUTO fan (uid 4, value 0) even though it is not advertised in the datapoints descriptor. This fix injects state
0for MH-AC-WIFI devices before the map lookup, correctly matching key 30{0: auto, 1: quiet, 2: low, 3: medium, 4: high}and removing the spurious max option.Tested on MH-AC-WIFI-1 hardware with Mitsubishi Heavy Industries SRK series units (3 devices).