-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add fixture for p300 1.0.15 #915
Conversation
c1bdb28
to
9843fbe
Compare
I'm guessing this is erroring initially because the parent device does not support auto_off but reports it in the same way as the ks240 reports it's child device features? I think once #964 is merged we can use the test framework changes in that PR to ensure we call the module on the child devices for this use case. We'd also need to extend the module logic so it actually performs the child query. I'm thinking we may be able to improve on the current logic around not adding modules that the parent reports but doesn't really support (i.e. ks240). Rather than simply not adding it if the child reports it we could instead implement the |
Correct.
I'm not sure we can do this type of magic, at least not on all devices, as each individual socket have their own auto off timers.
Yes, this would fix it for P300. We probably do not want to perform all child module queries as most of the times the information is already available, but we could use a logic on specific modules to check which extra queries to run?
Sounds worth trying out 👍 |
#966 removes the switch hardcoding for not adding unsupported modules to the parent. The P300 with child auto_off should now be supported with #967. |
Replaces the logic to skip adding child modules to parent devices based on whether a device is a wall switch and instead relies on the `_check_supported` method. Is more future proof and will fix issue with the P300 with child `auto_off` modules #915 not supported on the parent.
Required for the P300 firmware update with `auto_off` module on child devices. Will query child modules for parent devices that are not hubs. Coverage will be fixed when the P300 fixture is added #915
This adds auto-off to the device, but it seems to be using different commands to control it.
9843fbe
to
2ffb62c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #915 +/- ##
==========================================
+ Coverage 91.33% 91.49% +0.16%
==========================================
Files 83 83
Lines 5539 5539
Branches 1349 1349
==========================================
+ Hits 5059 5068 +9
+ Misses 374 369 -5
+ Partials 106 102 -4 ☔ View full report in Codecov by Sentry. |
## [0.7.0.dev4](https://github.com/python-kasa/python-kasa/tree/0.7.0.dev4) (2024-06-10) [Full Changelog](0.7.0.dev3...0.7.0.dev4) **Implemented enhancements:** - Support smart child modules queries [\#967](#967) (@sdb9696) - Do not expose child modules on parent devices [\#964](#964) (@sdb9696) - Do not add parent only modules to strip sockets [\#963](#963) (@sdb9696) **Project maintenance:** - Better checking of child modules not supported by parent device [\#966](#966) (@sdb9696) - Add fixture for p300 1.0.15 [\#915](#915) (@rytilahti)
This version adds auto-off for individual strip sockets.