-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Initial support for xiaomi gateway devices #470
Conversation
Great job! Yesterday I was upset about unsupported gateway and decided to write my own bindings, but it's cool that I've found a ready to use solution :) |
@rytilahti can this be merged? |
I'm waiting for #634 to be merged before doing the next (0.50!) release, just to avoid pushing two releases out in so short order. I'm hoping it will be done soon enough, but feel free to add cleanup PRs if you like! Otherwise I will do it when we are nearing the release. |
* added color and brightness functionality * added command to set both color and brightness * linting fixes
* add new line * remove To Do comment Since this does not have to do with the gateway (I think) * Fully finish the GatewayAlarm class * black fix styles * fix hound issue * flake8 was wrong, black is wright * ignore flake8 E203 error since black handles that * Turning --> Turn Co-Authored-By: Teemu R. <tpr@iki.fi> * Turning --> Turn Co-Authored-By: Teemu R. <tpr@iki.fi> * add type return Co-Authored-By: Teemu R. <tpr@iki.fi> * add flake8 exception for single line * remove global flake8 ignore * add extra space * add return types * fix return types * datatime.datetime is unknown type * remove print() * Reorganize classes * Use parent and improve init * Add Xiaomi Aqara Gateway to readme Co-authored-by: Teemu R. <tpr@iki.fi>
@approximatenumber I moved the light controls underneath a "subdevice" accessible under @starkillerOG do you mind giving this a test and say OK if the functionality you want is still working and we can merge this now? I did some cleanups, but nothing that should break the alarm interfaces. |
@rytilahti thanks, looks good! |
hello @rytilahti |
No idea, to be honest. This was based on some very old code for the first or second gen gateway (with the developer mode to be used with https://github.com/Danielhiversen/PyXiaomiGateway) which was sold in a kit several years ago. |
@rytilahti I have just tested the Alarm class and it works perfectly! |
This adds preliminary support for Xiaomi Aqara gateway devices. Currently implemented interfaces include controlling the alarm and the light facilities, as well as some other miscellaneous features.
Thanks to @approximatenumber and @starkillerOG for pushing to make this happen 🎉
This has been rotting on my computer for over a year, so I thought I'd just push this up in case someone wants to work on it - personally I'm not going to do that as I'm using zigbee2mqtt to control my xiaomi devices. The code does not work without modifications, but gives at least a starting point to build upon.
Related to home-assistant/core#20294