Skip to content

ECO Mode is incorrectly restricted to COOL mode only #41

Description

@Airey001

Some Midea units support ECO mode while operating in AUTO mode, but the current implementation prevents the command from ever being sent because of a hardcoded mode restriction.

Current Behavior

In AirConditioner.cpp, checkConstraints() contains:

case Preset::PRESET_ECO:
return mode == MODE_COOL;

Because of this, when ESPHome (or another client using MideaUART) requests ECO while the unit is in MODE_AUTO, checkConstraints() returns false, the control update is discarded, and no SET_STATUS packet is transmitted to the indoor unit.

From the user's perspective, ECO simply appears to do nothing.

Expected Behavior

If the connected unit supports ECO in AUTO mode, the library should allow the command to be sent.

Changing the constraint to:

case Preset::PRESET_ECO:
return mode == MODE_COOL || mode == MODE_AUTO;

resolved the issue on my system. After making this change:

ECO commands are transmitted successfully.
The indoor unit enters ECO mode while operating in AUTO.
ESPHome and Home Assistant behave as expected.
Hardware
Midea U and Midea U+ Air Conditions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions