-
-
Notifications
You must be signed in to change notification settings - Fork 221
Add FeatureAttributes to smartcam Alarm #1489
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1489 +/- ##
==========================================
+ Coverage 92.63% 92.64% +0.01%
==========================================
Files 149 149
Lines 9434 9439 +5
Branches 958 958
==========================================
+ Hits 8739 8745 +6
+ Misses 498 496 -2
- Partials 197 198 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
"""Define a wrapper to set _last_update_time to None. | ||
|
||
This will ensure that a module is updated in the next update cycle after | ||
a value has been changed. | ||
""" | ||
|
||
async def _async_wrap(self: _T, *args: _P.args, **kwargs: _P.kwargs) -> dict: | ||
@wraps(func) |
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.
This was previously not working when using a decorator which the test cases highlighted. i.e. if using a decorator the type hints were not copied to the decorator function so get_feature
would fail.
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.
Just a couple of readability nits, feel free to fix/merge as you wish.
Co-authored-by: Teemu R. <tpr@iki.fi>
## [0.10.1](https://github.com/python-kasa/python-kasa/tree/0.10.1) (2025-02-02) [Full Changelog](0.10.0...0.10.1) **Release summary:** Small patch release for bugfixes **Implemented enhancements:** - dustbin\_mode: add 'off' mode for cleaner downstream impl [\#1488](#1488) (@rytilahti) - Add Dimmer Configuration Support [\#1484](#1484) (@ryenitcher) **Fixed bugs:** - Do not return empty string for custom light effect name [\#1491](#1491) (@sdb9696) - Add FeatureAttributes to smartcam Alarm [\#1489](#1489) (@sdb9696) **Project maintenance:** - Add module.device to the public api [\#1478](#1478) (@sdb9696)
These were missed off in #1479. Testing with HA PR 136642 picked this up.
Adding a test case for this highlighted that the decorators currently lose the
Annotated
annotations whichfunctools.wraps
fixes.