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

Xiaomi Air Purifier: The name of the enum must be used here because of the speed_list #12625

Conversation

syssi
Copy link
Member

@syssi syssi commented Feb 23, 2018

The fan.set_speed example value is lower-case and led to confusion. Both spellings are possible now: Idle & idle

Reverts: #12602

@balloob @OttoWinter Sorry for the mess. Could you merge this PR into the release branch?

The fan.set_speed example value is lower-case and led to confusion. Both spellings are possible now: Idle & idle
@OttoWinter
Copy link
Member

OttoWinter commented Feb 23, 2018

I can put it in the 0.64.0 milestone so that it isn't missed when releasing (please tell me if that's the correct way...)

Also: Just some thoughts, but this to me seems like just another case where enum is just incredibly weird in python (compared to other languages, like Java (😉)). Why do OperationMode() and OperationMode[] a) both exist and b) behave so differently? Also: [] apparently has almost double the speed of ()

screen shot 2018-02-23 at 17 47 37

@OttoWinter OttoWinter added this to the 0.64.0 milestone Feb 23, 2018
@syssi
Copy link
Member Author

syssi commented Feb 23, 2018

This is the enum: https://github.com/rytilahti/python-miio/blob/master/miio/airpurifier.py#L15-L19

It's accessible in both ways. I'm using the enum to have a nice title at the dropdown:

states_group livingroom

The service must accept the title of the dropdown because I cannot populate the option value of the dropdown with other values.

@balloob balloob merged commit c3d322f into home-assistant:dev Feb 23, 2018
@balloob
Copy link
Member

balloob commented Feb 23, 2018

Tagging the milestone is the right thing to do. I'll make sure to cherry-pick them before the release.

balloob pushed a commit that referenced this pull request Feb 25, 2018
…2625)

The fan.set_speed example value is lower-case and led to confusion. Both spellings are possible now: Idle & idle
@balloob balloob mentioned this pull request Feb 25, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants