Skip to content

fix: correct dmaker-p5 fan speed range in spec_modify#1714

Open
JiasenL wants to merge 1 commit into
XiaoMi:mainfrom
JiasenL:fix/dmaker-p5-fan-speed
Open

fix: correct dmaker-p5 fan speed range in spec_modify#1714
JiasenL wants to merge 1 commit into
XiaoMi:mainfrom
JiasenL:fix/dmaker-p5-fan-speed

Conversation

@JiasenL

@JiasenL JiasenL commented May 14, 2026

Copy link
Copy Markdown

Summary

  • prop.2.6 (piid=6) on the dmaker-p5 fan is used by the device firmware as a 0–100 speed percentage, but the MIoT cloud spec describes it with a 4-item value-list (values 1–4)
  • This causes the fan entity to pick value-list item 4 when the user sets 100%, sending 4 to the device — which the device interprets as 4% speed
  • The device also reports actual speed feedback (e.g. 50, 75) on piid=6, causing KeyError crashes in _speed_name_map
  • Override prop.2.6 with value-range: [0, 100, 1] so the integration sends the correct percentage and reads feedback correctly

Test plan

  • Set fan to 100% in Home Assistant — fan should run at full speed
  • Set fan to 50% — fan should run at half speed
  • Verify no on prop msg error / KeyError in HA logs for did: 241255235, siid: 2, piid: 6

🤖 Generated with Claude Code

prop.2.6 (piid=6) on the dmaker-p5 is a 0-100 speed percentage
but the MIoT cloud spec describes it as a 4-item value-list.
This causes the fan to run at 4% when set to 100% (the value-list
index 4 is sent as the speed value directly). Override with
value-range [0, 100, 1] so the integration sends the correct
percentage value to the device.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented May 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants