Version 3.5.8
Release Notes v3.5.8
Bug Fixes
Air purifier fan reverts from Auto to Manual mode when controlled via HomeKit
Affected appliance types: Air purifiers with a Workmode capability that uses
triggers to mark Fanspeed as disabled: true for Auto, Quiet, and PowerOff modes
(e.g. Muju / 956006959323006505087076).
Symptom: Switching the fan to Auto mode in Home Assistant or via the HomeKit
Bridge caused the appliance to immediately revert to Manual mode. The mode flip
happened within seconds of the switch, so the entity toggled back and forth visibly in
the UI and physical appliance.
Root cause — HomeKit Bridge reads percentage and then re-applies it
When you switch to Auto mode the integration correctly sends {"Workmode": "Auto"} to
the appliance. However, the HomeKit Bridge then reads the percentage property (which
still reported a speed value such as 20 %) and, to keep its internal model consistent,
immediately calls set_percentage(20). The integration translated that into
{"Fanspeed": 1}.
The Muju appliance firmware interprets a Fanspeed command as implicit confirmation that
the user wants manual speed control; it therefore reverts Workmode to Manual. The
appliance capability document encodes this behaviour via Workmode triggers:
{
"Workmode": {
"triggers": [
{
"condition": { "operator": "eq", "operand_1": "value", "operand_2": "Auto" },
"action": { "Fanspeed": { "disabled": true } }
},
{
"condition": { "operator": "eq", "operand_1": "value", "operand_2": "Quiet" },
"action": { "Fanspeed": { "disabled": true } }
}
]
}
}The integration was not reading these triggers, so it did not know that Fanspeed was
off-limits in Auto/Quiet mode.
Fix — three-level guard in fan.py
-
_is_fanspeed_disabled()helper — inspects theWorkmodecapability'striggers
list for the current mode. ReturnsTruewhen any trigger marksFanspeedas
disabled: truefor the currentWorkmodevalue. -
percentagereturnsNonewhen disabled — when_is_fanspeed_disabled()is
Truethepercentageproperty returnsNoneinstead of the raw speed value.
Nonetells Home Assistant (and the HomeKit Bridge) that speed is not
user-controllable in the current mode, preventing the bridge from issuing a
set_percentagecall at all. -
async_set_percentageswitches to Manual first — if aset_percentagecall does
arrive whileFanspeedis disabled (e.g. from a UI slider or a non-HomeKit
client), the integration now switchesWorkmodetoManualbefore sending the
Fanspeedcommand. This is semantically correct: the user is explicitly requesting
speed control, so switching to Manual is the right behaviour.
⚠ Testing required: This change affects air purifiers and any other fan entities
where the appliance's capability document usesWorkmodetriggers to disableFanspeed
in certain modes. After upgrading, please verify:
- Switching to Auto (or Quiet) mode stays in that mode — it no longer reverts
to Manual.- Adjusting speed from the HA UI or a shortcut while in Auto mode switches the
appliance to Manual and then applies the requested speed (expected behaviour).- Manual mode speed control continues to work as before.
- Appliances without
triggersin theirWorkmodecapability are unaffected.
If you observe regressions, please report them with the integration log at DEBUG level.