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

AirDogX3, AirDogX5, AirDogX7SM support #159

Merged
merged 12 commits into from
May 6, 2021
Merged

Conversation

alexeypetrenko
Copy link
Contributor

@alexeypetrenko alexeypetrenko commented Mar 29, 2021

This is a PR following this discussion #72

I tried to follow existing structure as close as possilbe.

I inherited a new object from XiaomiGenericDevice and not from XiaomiAirPurifier. It seems that there are a lot of unneeded functionality in XiaomiAirPurifier. Although, I had to copy async_update as is. Hope it is not a problem

Unlike other devices, this device uses a combination of mode and speed to set any given preset.
So, there is no ready made _preset_modes list.
I mapped usable combinations to _preset_modes using _preset_modes_to_mode_speed dictionary.

To function this PR requires following bug-fix in python-miio to be accepted: rytilahti/python-miio#993

I tested it on both of my devices (#72 (comment)).
Everything works fine.
Screenshot from 2021-03-29 16-50-57
Screenshot from 2021-03-29 16-51-08
Screenshot from 2021-03-29 16-51-17

Service xiaomi_miio_airpurifier: fan_set_filters_cleaned also works.

Copy link
Owner

@syssi syssi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Can be merged as soon the next python-miio version is released.

@syssi syssi merged commit 30666a1 into syssi:develop May 6, 2021
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