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

Re-add mapping parameter to MiotDevice ctor #985

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

rytilahti
Copy link
Owner

Note that the method signature is different from previous versions to accommodate the compatibility with the Device ctor.

Previous versions had a signature where the mapping was the first argument, now it is only allowed as a keyword-only argument:

dev = MiotDevice("127.0.0.1", "token")

and

dev = MiotDevice("127.0.0.1", "token", mapping={})

are the the allowed ways to initialize a plain MiotDevice instance.

The implementations should not override the constructor to use this method to pass the mapping, but instead define mapping as a class variable.

Fixes #982

Note that the method signature is different from previous versions to accommodate the compatibility with Device ctor
Fixes #982
@rytilahti rytilahti force-pushed the fix/miotdevice_ctor_regression branch from faeba0d to ad7e4e4 Compare March 24, 2021 14:44
@rytilahti rytilahti merged commit 8cb7264 into master Mar 24, 2021
@rytilahti rytilahti deleted the fix/miotdevice_ctor_regression branch March 24, 2021 21:38
@rytilahti rytilahti mentioned this pull request Mar 24, 2021
xvlady pushed a commit to xvlady/python-miio that referenced this pull request May 9, 2021
Note that the method signature is different from previous versions to accommodate the compatibility with Device ctor
Fixes rytilahti#982
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.

Please add back the mapping parameter to MiotDevice constructor
1 participant