-
-
Notifications
You must be signed in to change notification settings - Fork 238
Update library for D225 support #1602
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
base: master
Are you sure you want to change the base?
Update library for D225 support #1602
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1602 +/- ##
==========================================
+ Coverage 92.82% 92.84% +0.01%
==========================================
Files 157 157
Lines 9642 9654 +12
Branches 976 976
==========================================
+ Hits 8950 8963 +13
Misses 492 492
+ Partials 200 199 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rytilahti
left a comment
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.
Please clean up the unnecessary changes from this PR to make it easier to review, I will take a deeper look into the changes then.
kasa/cli/discover.py
Outdated
| # Ensure Discover._redact_data reflects the CLI flag for this invocation. | ||
| # Some discovery internals call redact_data for debug logging when the | ||
| # global Discover._redact_data is True. We temporarily set the global | ||
| # to match the user's request so that redact_data is only invoked when | ||
| # --redact is passed. Restore the previous value afterwards. |
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.
Please only modify parts necessary for the functionality related to this change.
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.
Comments have been removed
| self.target = target | ||
| self.target_1 = (target, self.discovery_port) | ||
| self.target_2 = (target, Discover.DISCOVERY_PORT_2) | ||
| self.target_3 = (target, Discover.DISCOVERY_PORT_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.
Wasn't this added already in an earlier PR? If so, please rebase on top of the current master branch.
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.
Should be rebased now
kasa/smartcam/modules/battery.py
Outdated
| return self._device.sys_info["battery_percent"] | ||
| return self._device.sys_info.get("battery_percent") | ||
|
|
||
| @property | ||
| def battery_low(self) -> bool: | ||
| def battery_low(self) -> bool | None: | ||
| """Return True if battery is low.""" | ||
| return self._device.sys_info["low_battery"] | ||
| return self._device.sys_info.get("low_battery") |
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.
Please do not change the API, these changes should not be necessary.
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.
Should be removed now
811d469 to
a5e6e97
Compare
a5e6e97 to
608be2c
Compare
8e4ddd1 to
1468f60
Compare
Discovery fails because D225 does not provide an encrypt_info field in it's response json