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

Add basic support for xiaomi.aircondition.mc1, mc2, mc4, mc5 #825

Merged
merged 10 commits into from
Nov 5, 2020

Conversation

zhangjingye03
Copy link
Contributor

This commit introduced basic support and tests for MIoT device
Xiaomi Mi Smart Air Conditioner A including xiaomi.aircondition.mc1,
mc2, mc4 and mc5 since they are nearly the same in miot-spec.

Tested on my xiaomi.aircondition.mc4. All properties and function work
except property `electricity' keeps zero.

Device miot-spec:
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mc4:1

Device Mi Home plugin:
https://cdn.cnbj1.fds.api.mi-img.com/rn-plugins/2020-08-25/signed_10043_1000595_66_ANDROID_bundle_d8d30e612b4b0722e4a74744614f3c53.zip

@zhangjingye03 zhangjingye03 force-pushed the support_ac branch 2 times, most recently from e43cfd6 to 031726c Compare October 3, 2020 11:27
This commit introduced basic support and tests for MIoT device
Xiaomi Mi Smart Air Conditioner A including xiaomi.aircondition.mc1,
mc2, mc4 and mc5 since they are nearly the same in miot-spec.

Tested on my xiaomi.aircondition.mc4. All properties and function work
except property `electricity' keeps zero.

Device miot-spec:
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mc4:1

Device Mi Home plugin:
https://cdn.cnbj1.fds.api.mi-img.com/rn-plugins/2020-08-25/signed_10043_1000595_66_ANDROID_bundle_d8d30e612b4b0722e4a74744614f3c53.zip
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, it's great to see more miot devices supported 🎉 A couple of small changes are needed, but otherwise this looks to be good to go.

miio/airconditioner_miot.py Show resolved Hide resolved
miio/airconditioner_miot.py Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
miio/airconditioner_miot.py Show resolved Hide resolved
miio/airconditioner_miot.py Outdated Show resolved Hide resolved
@rytilahti rytilahti added this to the 0.5.4 milestone Nov 2, 2020
Copy link
Collaborator

@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.

LGTM! Let's merge this new device!

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Okay, let's get it merged! 🎉

@rytilahti rytilahti merged commit 3987aa6 into rytilahti:master Nov 5, 2020
xvlady pushed a commit to xvlady/python-miio that referenced this pull request May 9, 2021
…ti#825)

* Add basic support for xiaomi.aircondition.mc1, mc2, mc4, mc5

This commit introduced basic support and tests for MIoT device
Xiaomi Mi Smart Air Conditioner A including xiaomi.aircondition.mc1,
mc2, mc4 and mc5 since they are nearly the same in miot-spec.

Tested on my xiaomi.aircondition.mc4. All properties and function work
except property `electricity' keeps zero.

Device miot-spec:
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mc4:1

Device Mi Home plugin:
https://cdn.cnbj1.fds.api.mi-img.com/rn-plugins/2020-08-25/signed_10043_1000595_66_ANDROID_bundle_d8d30e612b4b0722e4a74744614f3c53.zip

* Drop `incasesensitive' argument since it is the default behaviour of `EnumType'

* Add example response, change fan level to fan speed

* Add detailed parser and description for 'timer' and 'clean'

* Rename running_duration to total_running_duration

* Rename fan_percent to fan_speed_percent

* Rename the mapped miot property too

* Update docstrings

* Fix tests

Co-authored-by: Sebastian Muszynski <basti@linkt.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants