Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percentage_step is always 25 for dmaker.fan.p39 #247

Open
csharpfaze opened this issue Feb 29, 2024 · 0 comments
Open

percentage_step is always 25 for dmaker.fan.p39 #247

csharpfaze opened this issue Feb 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@csharpfaze
Copy link

I use the xiaomi smart tower fan (dmaker.fan.p39) and noticed that the control via cards is very limited.

By default, the more-info dialog is pretty nice and can be used as a card:

type: custom:more-info-card
entity: fan.xiaomi_smart_fan
title: Fan Control

But controlling the fan speed is only allowed in 25%-steps (dictated through the amount of preset_modes as far as I know)
State:

preset_modes:
  - "off"
  - Level 1
  - Level 2
  - Level 3
  - Level 4
direction: null
oscillating: false
percentage: 50
percentage_step: 25
...

For me personally I changed it directly to 1%-steps in a new property:

class XiaomiFanP39(XiaomiFanMiot):
    """Representation of a Xiaomi Fan P39."""

    @ property
    def percentage_step(self):
        return 1
    

Ideally, the percentage_step would have to be calculated by the possible values for the corresponding fan, so there should be better ways to implement this.

Is this worth mentioning or are most people using the service calls directly in order to control the exact percentage?

@syssi syssi added the bug Something isn't working label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants