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
re-structure gateway devices #782
Conversation
@rytilahti could you look if you agree with this structure for the gateway devices? |
@rytilahti This is now finished, all tests pass and it now also includes all base classes for switches and light bulbs. I can not actually test is since I don't own switches or light bulbs, but I am pretty sure it will work. If this gets merged I can add all the light bulbs and switches to HomeAssistant. |
The use of python-miio (importing) does not change with this PR, the following script will still work as it used to:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, sorry for taking the time, it's a huuuge diff and I haven't found time to look much into it until now. Here's my initial round of comments, more will follow up later after the first round of changes :-)
@rytilahti no problem, you don't have to hurry, it is indeed a large restructure. I won't have any time the next 3 weeks since I will be moving to a new house. |
@rytilahti I have prosessed all feedback and all tests pass again. |
Is this PR will bring Aqara relay support in HomeAssistant at last? And is it possible to expect the function of displaying the power consumtion on xiaomi wall switch with neutral line? |
@MicroSur yes and yes. |
The order of importing is important here to prevent circular dependancy
Whoops, I messed up the re-base to fix some merge conflicts. |
Restructure the gateway devices to put everything with simular API together.
The next step is to use common classes for devices with simular API (to be done in this PR).This PR also creates the base classes for switches and light bulbs, so all known models are now fully supported, although some models have not been tested (they are assummed to have simular API calls as devices that are closely related).
This PR also adds subdevice support for the
lumi.gateway.mgl03
and is a first step towards subdevice support for thelumi.gateway.mieu01