Skip to content

Keep fan mode in sync with speed and Auto Profile commands #47

Description

@EdenNelson

Home Assistant fan speed, fan preset/mode, and Auto Profile commands should keep the purifier's active fan mode coherent with MCU behavior.

Direct fan speed changes should put the purifier into Manual fan mode. Selecting an Auto Profile should put supported models into fan Auto mode. This keeps Home Assistant state, ESPHome state, and MCU-reported state synchronized instead of allowing Auto Profile, fan preset, and fan speed to temporarily describe different operating modes.

Current behavior can leave state incoherent. For example, Auto Profile may be set to Room Size while the active fan operating mode remains Manual, or a direct speed change may update speed before the fan preset/mode state clearly reflects Manual operation.

Acceptance criteria:

  • Direct fan speed changes switch the device to Manual fan mode when no explicit fan preset/mode was requested.
  • Local fan preset state updates to Manual immediately when a direct speed change implies Manual mode.
  • Fan preset/mode mapping stays consistent with MCU raw values:
    • Manual = 0
    • Sleep = 1
    • Auto = 2
    • Turbo = 4 where supported, such as EverestAir
    • Pet = 5 where supported
  • Parent fan command handling continues to send only changed fields: power, speed, and/or mode.
  • Selecting Auto Profile sends the profile command and then enters fan Auto mode where supported.
  • Home Assistant state, ESPHome state, and MCU-reported status stay synchronized after speed, preset, and Auto Profile commands.
  • Models without fan Auto mode, such as Core200S, do not send fan Auto mode.
  • No new Fan Operating Mode select entity is added in this PR.
  • No remembered Room Size persistence, Core room-size encoding changes, diagnostics, raw sensors, generated YAML churn, or unrelated model changes are included.

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