Skip to content

fix: support fan p5c fan-level - #1221

Closed
tiancheng91 wants to merge 2 commits into
XiaoMi:mainfrom
tiancheng91:hotfix/dmaker-p5c
Closed

fix: support fan p5c fan-level#1221
tiancheng91 wants to merge 2 commits into
XiaoMi:mainfrom
tiancheng91:hotfix/dmaker-p5c

Conversation

@tiancheng91

Copy link
Copy Markdown
Contributor

support fan dmaker.fan.p5c with stepless speed control.

@tiancheng91

tiancheng91 commented Jun 29, 2025

Copy link
Copy Markdown
Contributor Author

image
功能正常,但显示有点奇怪,fan-level变成独立实体了(滑条那个),修改前是个正常的fan控件

@SusanPhevos

Copy link
Copy Markdown
Contributor

SPEC_SERVICE_TRANS_MAP in xiaomi_home/miot/specs/specv2entity.py defines how a MIoT-Spec-V2 fan service can be converted to a Home Assistant fan entity. See here. A "on" property and a "fan-level" property are required in a fan service. If there is no "on" property, the fan service will not be converted to a fan entity.
Futhermore, in Mi Home APP, the stepless fan-level setting entry is only shown when the fan mode is "Straight Wind". When the fan mode is "Natural Wind", the fan-level has four level options. There is no need to support the stepless fan-level in the fan entity.

@tiancheng91
tiancheng91 marked this pull request as draft July 1, 2025 09:06
@tiancheng91

Copy link
Copy Markdown
Contributor Author

todo : adapt to mode selection, use different properties as the percent value for different modes. For the natural wind mode, use the fan-level property with a value-list, and for the direct wind mode, use the speed-level property with a value-range

@tiancheng91

Copy link
Copy Markdown
Contributor Author

SPEC_SERVICE_TRANS_MAP in xiaomi_home/miot/specs/specv2entity.py defines how a MIoT-Spec-V2 fan service can be converted to a Home Assistant fan entity. See here. A "on" property and a "fan-level" property are required in a fan service. If there is no "on" property, the fan service will not be converted to a fan entity. Futhermore, in Mi Home APP, the stepless fan-level setting entry is only shown when the fan mode is "Straight Wind". When the fan mode is "Natural Wind", the fan-level has four level options. There is no need to support the stepless fan-level in the fan entity.

Great, I understand. I'll close this MR first, and I'll try to adapt mode when I have time later.

@tiancheng91 tiancheng91 closed this Jul 1, 2025
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