-
-
Notifications
You must be signed in to change notification settings - Fork 239
Adds customizing of device port in TPLinkSmartHomeProtocol.query #109
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
Adds customizing of device port in TPLinkSmartHomeProtocol.query #109
Conversation
f851ba5 to
134efce
Compare
134efce to
79faf8e
Compare
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
==========================================
+ Coverage 72.88% 73.15% +0.26%
==========================================
Files 10 10
Lines 1232 1233 +1
Branches 185 183 -2
==========================================
+ Hits 898 902 +4
+ Misses 300 298 -2
+ Partials 34 33 -1
Continue to review full report at Codecov.
|
kasa/protocol.py
Outdated
| async def query( | ||
| host: str, | ||
| request: Union[str, Dict], | ||
| retry_count: int = 3, |
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.
I have nothing against this change although I'm not sure how many use cases there are for it, but what do you think about allowing passing the wanted port to __init__? That would allow us to expose this directly to SmartDevice constructors.
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.
I think that's better, actually. I'm waiting for feedback to see the #108 use case.
8f8d6ec to
7dc4060
Compare
|
How should we share the |
|
Hey and sorry for the belated response, I have been busy with other projects & got hit by flu. Anyway, I'm starting to have second thoughts on this, I would definitely not want to reintroduce the port variable through all the layers as it makes the code more confusing... My proposal would be to convert What do you think about something like this, @kirichkov? |
|
No worries! Hope you're doing better! I second your proposal! I don't like all those port constants all over the place. Hence why I asked for some input :) I'll get this changed and we can discuss it further. |
c72ede8 to
71ecbc2
Compare
71ecbc2 to
54bc7fa
Compare
|
Considering there has been no action for a while, I think we can close this and reopen if really necessary. |
This addresses the changing of destination port. Requested in #108