GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Initialize autooff features only when data is available by rytilahti · Pull Request #933 · python-kasa/python-kasa

Conversation

@rytilahti

@rytilahti rytilahti commented May 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

For power strips, the autooff data needs to be requested from the children.
Until we do that, we should not create these features to avoid crashing during switch platform initialization.

This also ports the module to use _initialize_features and add tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rytilahti
Initialize autooff features only when data is available
3c94da9
@rytilahti rytilahti added the bug Something isn't working label May 23, 2024
@codecov

codecov Bot commented May 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 91.38%. Comparing base (c1e1483) to head (8e765f3).
Report is 117 commits behind head on master.

Files Patch % Lines
kasa/smart/modules/autooff.py 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #933   +/-   ##
=======================================
  Coverage   91.37%   91.38%           
=======================================
  Files          83       83           
  Lines        5498     5501    +3     
  Branches     1339     1340    +1     
=======================================
+ Hits         5024     5027    +3     
  Misses        373      373           
  Partials      101      101           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rytilahti rytilahti mentioned this pull request May 23, 2024
Dynamic switches for tplink home-assistant/core#117758
Merged
5 of 24 tasks
@rytilahti
Add tests
54308ba
@rytilahti
rytilahti force-pushed the fix/autooff_init branch from b4dbf68 to 54308ba Compare May 23, 2024 15:07
rytilahti added 5 commits May 23, 2024 17:20
@rytilahti
skip the feature tests for py<3.10
ca91afb
@rytilahti
Allow None for all feature values..
e309fde
@rytilahti
One more try, use typing.Optional
bc9e8ca
@rytilahti
Skip the tests again for py<3.10
76f1962
@rytilahti
Don't print out exception details on error
8e765f3
sdb9696
sdb9696 reviewed May 24, 2024
View reviewed changes

@sdb9696 sdb9696 left a comment

Copy link
Copy Markdown
Contributor

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.

It seems the check itself is not covered by tests which is confusing because I would have thought the fixture file for the device would trigger this?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread kasa/tests/smart/modules/test_autooff.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread kasa/smart/modules/autooff.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

sdb9696
sdb9696 approved these changes May 24, 2024
View reviewed changes

@sdb9696 sdb9696 left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rytilahti reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@rytilahti
rytilahti merged commit 7671564 into master May 24, 2024
@rytilahti
rytilahti deleted the fix/autooff_init branch May 24, 2024 17:39
@sdb9696 sdb9696 mentioned this pull request Jun 5, 2024
Prepare 0.7.0.dev2 #952
Merged
sdb9696 added a commit that referenced this pull request Jun 5, 2024
@sdb9696
Prepare 0.7.0.dev2 (#952)
9deadaa
## [0.7.0.dev2](https://github.com/python-kasa/python-kasa/tree/0.7.0.dev2) (2024-06-05)

[Full Changelog](0.7.0.dev1...0.7.0.dev2)

**Implemented enhancements:**

- Make device initialisation easier by reducing required imports [\#936](#936) (@sdb9696)

**Fixed bugs:**

- Do not raise on multi-request errors on child devices [\#949](#949) (@rytilahti)
- Do not show a zero error code when cli exits from showing help [\#935](#935) (@rytilahti)
- Initialize autooff features only when data is available [\#933](#933) (@rytilahti)
- Fix P100 errors on multi-requests [\#930](#930) (@sdb9696)

**Documentation updates:**

- Update documentation structure and start migrating to markdown [\#934](#934) (@sdb9696)

**Closed issues:**

- Simplify instance creation API [\#927](#927)

**Merged pull requests:**

- Add P115 fixture [\#950](#950) (@rytilahti)
- Add some device fixtures [\#948](#948) (@rytilahti)
- Add fixture for S505D [\#947](#947) (@rytilahti)
- Fix passing custom port for dump\_devinfo [\#938](#938) (@rytilahti)
@sdb9696 sdb9696 mentioned this pull request Jun 21, 2024
Prepare 0.7.0 #998
Merged
sdb9696 added a commit that referenced this pull request Jun 23, 2024
@sdb9696
Prepare 0.7.0 (#998)
4df5fbc
## [0.7.0](https://github.com/python-kasa/python-kasa/tree/0.7.0) (2024-06-23)

[Full Changelog](0.6.2.1...0.7.0)

We have been working hard behind the scenes to make this major release possible.
This release brings a major refactoring of the library to serve the ever-growing list of supported devices and paves the way for the future, yet unsupported devices.
The library now exposes device features through generic module and feature interfaces, that allows easy extension for future improvements.

With almost 180 merged pull requests, over 200 changed files and  since the last release, this release includes lots of goodies for everyone:
* Support for multi-functional devices like the dimmable fan KS240.
* Initial support for hubs and hub-connected devices like thermostats and sensors.
* Both IOT (legacy kasa) and SMART (tapo and newer kasa) devices now expose features and share common API.
* Modules to allow controlling new devices and functions such as light presets, fan controls, thermostats, humidity sensors, firmware updates and alarms.
* The common APIs allow dynamic introspection of available device features, making it easy to create dynamic interfaces.
* Improved documentation.

Hope you enjoy the release, feel free to leave a comment and feedback!

If you have a device that works, but is not listed in our supported devices list, feel free to [contribute fixture files](https://python-kasa.readthedocs.io/en/latest/contribute.html#contributing-fixture-files) to help us to make the library even better!

> git diff 0.6.2.1..HEAD|diffstat
> 214 files changed, 26960 insertions(+), 6310 deletions(-)

For more information on the changes please checkout our [documentation on the API changes](https://python-kasa.readthedocs.io/en/latest/deprecated.html)

**Breaking changes:**

- Add common energy module and deprecate device emeter attributes [\#976](#976) (@sdb9696)
- Move SmartBulb into SmartDevice [\#874](#874) (@sdb9696)
- Change state\_information to return feature values [\#804](#804) (@rytilahti)
- Remove SmartPlug in favor of SmartDevice [\#781](#781) (@rytilahti)
- Add generic interface for accessing device features [\#741](#741) (@rytilahti)

**Implemented enhancements:**

- Cleanup cli output [\#1000](#1000) (@rytilahti)
- Improve autooff name and unit [\#997](#997) (@rytilahti)
- Update mode, time, rssi and report\_interval feature names/units [\#995](#995) (@sdb9696)
- Add unit\_getter for feature [\#993](#993) (@rytilahti)
- Add timezone to on\_since attributes [\#978](#978) (@sdb9696)
- Add type hints to feature set\_value [\#974](#974) (@sdb9696)
- Handle unknown light effect names and only calculate effect list once [\#973](#973) (@sdb9696)
- 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)
- Add time sync command [\#951](#951) (@rytilahti)
- Make device initialisation easier by reducing required imports [\#936](#936) (@sdb9696)
- Fix set\_state for common light modules [\#929](#929) (@sdb9696)
- Add state feature for iot devices [\#924](#924) (@rytilahti)
- Add post update hook to module and use in smart LightEffect [\#921](#921) (@sdb9696)
- Add LightEffect module for smart light strips [\#918](#918) (@sdb9696)
- Add light presets common module to devices. [\#907](#907) (@sdb9696)
- Improve categorization of features [\#904](#904) (@rytilahti)
- Create common interfaces for remaining device types [\#895](#895) (@sdb9696)
- Make get\_module return typed module [\#892](#892) (@sdb9696)
- Add LightEffectModule for dynamic light effects on SMART bulbs [\#887](#887) (@sdb9696)
- Implement choice feature type [\#880](#880) (@rytilahti)
- Add Fan interface for SMART devices [\#873](#873) (@sdb9696)
- Improve temperature controls [\#872](#872) (@rytilahti)
- Add precision\_hint to feature [\#871](#871) (@rytilahti)
- Be more lax on unknown SMART devices [\#863](#863) (@rytilahti)
- Handle paging of partial responses of lists like child\_device\_info [\#862](#862) (@sdb9696)
- Better firmware module support for devices not connected to the internet [\#854](#854) (@sdb9696)
- Re-query missing responses after multi request errors [\#850](#850) (@sdb9696)
- Implement action feature [\#849](#849) (@rytilahti)
- Add temperature control module for smart [\#848](#848) (@rytilahti)
- Implement feature categories [\#846](#846) (@rytilahti)
- Expose IOT emeter info as features [\#844](#844) (@rytilahti)
- Add support for feature units [\#843](#843) (@rytilahti)
- Add ColorModule for smart devices [\#840](#840) (@sdb9696)
- Add colortemp feature for iot devices [\#827](#827) (@rytilahti)
- Add support for firmware module v1 [\#821](#821) (@sdb9696)
- Add colortemp module [\#814](#814) (@rytilahti)
- Add iot brightness feature [\#808](#808) (@sdb9696)
- Revise device initialization and subsequent updates [\#807](#807) (@rytilahti)
- Add brightness module [\#806](#806) (@rytilahti)
- Support multiple child requests [\#795](#795) (@sdb9696)
- Support for on\_off\_gradually v2+ [\#793](#793) (@rytilahti)
- Improve smartdevice update module [\#791](#791) (@rytilahti)
- Add --child option to feature command [\#789](#789) (@rytilahti)
- Add temperature\_unit feature to t315 [\#788](#788) (@rytilahti)
- Add feature for ambient light sensor [\#787](#787) (@shifty35)
- Add initial support for H100 and T315 [\#776](#776) (@rytilahti)
- Generalize smartdevice child support [\#775](#775) (@rytilahti)
- Raise CLI errors in debug mode [\#771](#771) (@sdb9696)
- Add cloud module for smartdevice [\#767](#767) (@rytilahti)
- Add firmware module for smartdevice [\#766](#766) (@rytilahti)
- Add fan module [\#764](#764) (@rytilahti)
- Add smartdevice module for led controls [\#761](#761) (@rytilahti)
- Auto auto-off module for smartdevice [\#760](#760) (@rytilahti)
- Add smartdevice module for smooth transitions [\#759](#759) (@rytilahti)
- Initial implementation for modularized smartdevice [\#757](#757) (@rytilahti)
- Let caller handle SMART errors on multi-requests [\#754](#754) (@sdb9696)
- Add 'shell' command to cli [\#738](#738) (@rytilahti)

**Fixed bugs:**

- Fix smart led status to report rule status [\#1002](#1002) (@sdb9696)
- Demote device\_time back to debug [\#1001](#1001) (@rytilahti)
- Fix to call update when only --device-family passed to cli [\#987](#987) (@sdb9696)
- Disallow non-targeted device commands [\#982](#982) (@rytilahti)
- Add supported check to light transition module [\#971](#971) (@sdb9696)
- Fix switching off light effects for iot lights strips [\#961](#961) (@sdb9696)
- Add state features to iot strip sockets [\#960](#960) (@sdb9696)
- Ensure http delay logic works during default login attempt [\#959](#959) (@sdb9696)
- Fix fan speed level when off and derive smart fan module from common fan interface [\#957](#957) (@sdb9696)
- Require update in cli for wifi commands [\#956](#956) (@rytilahti)
- Do not raise on multi-request errors on child devices [\#949](#949) (@rytilahti)
- Do not show a zero error code when cli exits from showing help [\#935](#935) (@rytilahti)
- Initialize autooff features only when data is available [\#933](#933) (@rytilahti)
- Fix P100 errors on multi-requests [\#930](#930) (@sdb9696)
- Fix potential infinite loop if incomplete lists returned [\#920](#920) (@sdb9696)
- Add 'battery\_percentage' only when it's available [\#906](#906) (@rytilahti)
- Add missing alarm volume 'normal' [\#899](#899) (@rytilahti)
- Use Path.save for saving the fixtures [\#894](#894) (@rytilahti)
- Fix wifi scan re-querying error [\#891](#891) (@sdb9696)
- Fix --help on subcommands [\#886](#886) (@rytilahti)
- Fix smartprotocol response list handler to handle null reponses [\#884](#884) (@sdb9696)
- Improve feature setter robustness [\#870](#870) (@rytilahti)
- smartbulb: Limit brightness range to 1-100 [\#829](#829) (@rytilahti)
- Fix energy module calling get\_current\_power [\#798](#798) (@sdb9696)
- Fix auto update switch [\#786](#786) (@rytilahti)
- Retry query on 403 after successful handshake [\#785](#785) (@sdb9696)
- Ensure connections are closed when cli is finished [\#752](#752) (@sdb9696)
- Fix for P100 on fw 1.1.3 login\_version none [\#751](#751) (@sdb9696)
- Pass timeout parameters to discover\_single [\#744](#744) (@sdb9696)
- Reduce AuthenticationExceptions raising from transports [\#740](#740) (@sdb9696)
- Do not crash cli on missing discovery info [\#735](#735) (@rytilahti)
- Fix port-override for aes&klap transports [\#734](#734) (@rytilahti)
- Fix discovery cli to print devices not printed during discovery timeout [\#670](#670) (@sdb9696)

**Added support for devices:**

- Add fixture for L920-5\(EU\) 1.0.7 [\#972](#972) (@rytilahti)
- Add P115 fixture [\#950](#950) (@rytilahti)
- Add some device fixtures [\#948](#948) (@rytilahti)
- Add fixture for S505D [\#947](#947) (@rytilahti)
- Add fixture for p300 1.0.15 [\#915](#915) (@rytilahti)
- Add H100 1.5.10 and KE100 2.4.0 fixtures [\#905](#905) (@rytilahti)
- Add fixture for waterleak sensor T300 [\#897](#897) (@rytilahti)
- Add support for contact sensor \(T110\) [\#877](#877) (@rytilahti)
- Add support for waterleak sensor \(T300\) [\#876](#876) (@rytilahti)
- Add support for KH100 hub [\#847](#847) (@Adriandorr)
- Support for new ks240 fan/light wall switch [\#839](#839) (@sdb9696)
- Add P100 fw 1.4.0 fixture [\#820](#820) (@sdb9696)
- Add fixture for P110 sw 1.0.7 [\#801](#801) (@rytilahti)
- Add updated l530 fixture 1.1.6 [\#792](#792) (@rytilahti)
- Fix devtools for P100 and add fixture [\#753](#753) (@sdb9696)
- Add H100 fixtures [\#737](#737) (@rytilahti)

**Documentation updates:**

- Cleanup README to use the new cli format [\#999](#999) (@rytilahti)
- Add 0.7 api changes section to docs [\#996](#996) (@sdb9696)
- Update README to be more approachable for new users [\#994](#994) (@rytilahti)
- Update docs with more howto examples [\#968](#968) (@sdb9696)
- Update documentation structure and start migrating to markdown [\#934](#934) (@sdb9696)
- Add tutorial doctest module and enable top level await [\#919](#919) (@sdb9696)
- Add warning about tapo watchdog [\#902](#902) (@rytilahti)
- Move contribution instructions into docs [\#901](#901) (@rytilahti)
- Add rust tapo link to README [\#857](#857) (@rytilahti)
- Enable shell extra for installing ptpython and rich [\#782](#782) (@sdb9696)
- Add WallSwitch device type and autogenerate supported devices docs [\#758](#758) (@sdb9696)

**Project maintenance:**

- Drop python3.8 support [\#992](#992) (@rytilahti)
- Remove anyio dependency from pyproject.toml [\#990](#990) (@sdb9696)
- Configure mypy to run in virtual environment and fix resulting issues [\#989](#989) (@sdb9696)
- Better checking of child modules not supported by parent device [\#966](#966) (@sdb9696)
- Use freezegun for testing aes http client delays [\#954](#954) (@sdb9696)
- Fix passing custom port for dump\_devinfo [\#938](#938) (@rytilahti)
- Update release playbook [\#932](#932) (@rytilahti)
- Deprecate device level light, effect and led attributes [\#916](#916) (@sdb9696)
- Update cli to use common modules and remove iot specific cli testing [\#913](#913) (@sdb9696)
- Deprecate is\_something attributes [\#912](#912) (@sdb9696)
- Make Light and Fan a common module interface [\#911](#911) (@sdb9696)
- Rename bulb interface to light and move fan and light interface to interfaces [\#910](#910) (@sdb9696)
- Make module names consistent and remove redundant module casting [\#909](#909) (@sdb9696)
- Add child devices from hubs to generated list of supported devices [\#898](#898) (@sdb9696)
- Update interfaces so they all inherit from Device [\#893](#893) (@sdb9696)
- Update ks240 fixture with child device query info [\#890](#890) (@sdb9696)
- Use pydantic.v1 namespace on all pydantic versions [\#883](#883) (@rytilahti)
- Update dump\_devinfo to print original exception stack on errors. [\#882](#882) (@sdb9696)
- Put modules back on children for wall switches [\#881](#881) (@sdb9696)
- Fix pypy39 CI cache on macos [\#868](#868) (@sdb9696)
- Do not try coverage upload for pypy [\#867](#867) (@sdb9696)
- Add runner.arch to cache-key in CI [\#866](#866) (@sdb9696)
- Fix broken CI due to missing python version on macos-latest [\#864](#864) (@sdb9696)
- Fix incorrect state updates in FakeTestProtocols [\#861](#861) (@sdb9696)
- Embed FeatureType inside Feature [\#860](#860) (@rytilahti)
- Include component\_nego with child fixtures [\#858](#858) (@sdb9696)
- Use brightness module for smartbulb [\#853](#853) (@rytilahti)
- Ignore system environment variables for tests [\#851](#851) (@rytilahti)
- Remove mock fixtures [\#845](#845) (@rytilahti)
- Enable and convert to future annotations [\#838](#838) (@sdb9696)
- Update poetry locks and pre-commit hooks [\#837](#837) (@sdb9696)
- Cache pipx in CI and add custom setup action [\#835](#835) (@sdb9696)
- Fix non python 3.8 compliant test [\#832](#832) (@sdb9696)
- Fix CI issue with python version used by pipx to install poetry [\#831](#831) (@sdb9696)
- Refactor split smartdevice tests to test\_{iot,smart}device [\#822](#822) (@rytilahti)
- Add pre-commit caching and fix poetry extras cache [\#817](#817) (@sdb9696)
- Fix slow aestransport and cli tests [\#816](#816) (@sdb9696)
- Do not run coverage on pypy and cache poetry envs [\#812](#812) (@sdb9696)
- Update test framework for dynamic parametrization [\#810](#810) (@sdb9696)
- Put child fixtures in subfolder [\#809](#809) (@sdb9696)
- Simplify device \_\_repr\_\_ [\#805](#805) (@rytilahti)
- Add T315 fixture, tests for humidity&temperature modules [\#802](#802) (@rytilahti)
- Do not fail fast on pypy CI jobs [\#799](#799) (@sdb9696)
- Update dump\_devinfo to collect child device info [\#796](#796) (@sdb9696)
- Refactor test framework [\#794](#794) (@sdb9696)
- Add missing firmware module import [\#774](#774) (@rytilahti)
- Fix dump\_devinfo scrubbing for ks240 [\#765](#765) (@rytilahti)
- Rename and deprecate exception classes [\#739](#739) (@sdb9696)
- Refactor devices into subpackages and deprecate old names [\#716](#716) (@sdb9696)
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
@rytilahti
Initialize autooff features only when data is available (python-kasa#933
9fe82ab
)

For power strips, the autooff data needs to be requested from the
children.
Until we do that, we should not create these features to avoid crashing
during switch platform initialization.

This also ports the module to use `_initialize_features` and add tests.
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
@sdb9696
Prepare 0.7.0.dev2 (python-kasa#952)
04cce07
## [0.7.0.dev2](https://github.com/python-kasa/python-kasa/tree/0.7.0.dev2) (2024-06-05)

[Full Changelog](python-kasa/python-kasa@0.7.0.dev1...0.7.0.dev2)

**Implemented enhancements:**

- Make device initialisation easier by reducing required imports [\python-kasa#936](python-kasa#936) (@sdb9696)

**Fixed bugs:**

- Do not raise on multi-request errors on child devices [\python-kasa#949](python-kasa#949) (@rytilahti)
- Do not show a zero error code when cli exits from showing help [\python-kasa#935](python-kasa#935) (@rytilahti)
- Initialize autooff features only when data is available [\python-kasa#933](python-kasa#933) (@rytilahti)
- Fix P100 errors on multi-requests [\python-kasa#930](python-kasa#930) (@sdb9696)

**Documentation updates:**

- Update documentation structure and start migrating to markdown [\python-kasa#934](python-kasa#934) (@sdb9696)

**Closed issues:**

- Simplify instance creation API [\python-kasa#927](python-kasa#927)

**Merged pull requests:**

- Add P115 fixture [\python-kasa#950](python-kasa#950) (@rytilahti)
- Add some device fixtures [\python-kasa#948](python-kasa#948) (@rytilahti)
- Add fixture for S505D [\python-kasa#947](python-kasa#947) (@rytilahti)
- Fix passing custom port for dump\_devinfo [\python-kasa#938](python-kasa#938) (@rytilahti)
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
@sdb9696
Prepare 0.7.0 (python-kasa#998)
f5f91fd
## [0.7.0](https://github.com/python-kasa/python-kasa/tree/0.7.0) (2024-06-23)

[Full Changelog](python-kasa/python-kasa@0.6.2.1...0.7.0)

We have been working hard behind the scenes to make this major release possible.
This release brings a major refactoring of the library to serve the ever-growing list of supported devices and paves the way for the future, yet unsupported devices.
The library now exposes device features through generic module and feature interfaces, that allows easy extension for future improvements.

With almost 180 merged pull requests, over 200 changed files and  since the last release, this release includes lots of goodies for everyone:
* Support for multi-functional devices like the dimmable fan KS240.
* Initial support for hubs and hub-connected devices like thermostats and sensors.
* Both IOT (legacy kasa) and SMART (tapo and newer kasa) devices now expose features and share common API.
* Modules to allow controlling new devices and functions such as light presets, fan controls, thermostats, humidity sensors, firmware updates and alarms.
* The common APIs allow dynamic introspection of available device features, making it easy to create dynamic interfaces.
* Improved documentation.

Hope you enjoy the release, feel free to leave a comment and feedback!

If you have a device that works, but is not listed in our supported devices list, feel free to [contribute fixture files](https://python-kasa.readthedocs.io/en/latest/contribute.html#contributing-fixture-files) to help us to make the library even better!

> git diff 0.6.2.1..HEAD|diffstat
> 214 files changed, 26960 insertions(+), 6310 deletions(-)

For more information on the changes please checkout our [documentation on the API changes](https://python-kasa.readthedocs.io/en/latest/deprecated.html)

**Breaking changes:**

- Add common energy module and deprecate device emeter attributes [\python-kasa#976](python-kasa#976) (@sdb9696)
- Move SmartBulb into SmartDevice [\python-kasa#874](python-kasa#874) (@sdb9696)
- Change state\_information to return feature values [\python-kasa#804](python-kasa#804) (@rytilahti)
- Remove SmartPlug in favor of SmartDevice [\python-kasa#781](python-kasa#781) (@rytilahti)
- Add generic interface for accessing device features [\python-kasa#741](python-kasa#741) (@rytilahti)

**Implemented enhancements:**

- Cleanup cli output [\python-kasa#1000](python-kasa#1000) (@rytilahti)
- Improve autooff name and unit [\python-kasa#997](python-kasa#997) (@rytilahti)
- Update mode, time, rssi and report\_interval feature names/units [\python-kasa#995](python-kasa#995) (@sdb9696)
- Add unit\_getter for feature [\python-kasa#993](python-kasa#993) (@rytilahti)
- Add timezone to on\_since attributes [\python-kasa#978](python-kasa#978) (@sdb9696)
- Add type hints to feature set\_value [\python-kasa#974](python-kasa#974) (@sdb9696)
- Handle unknown light effect names and only calculate effect list once [\python-kasa#973](python-kasa#973) (@sdb9696)
- Support smart child modules queries [\python-kasa#967](python-kasa#967) (@sdb9696)
- Do not expose child modules on parent devices [\python-kasa#964](python-kasa#964) (@sdb9696)
- Do not add parent only modules to strip sockets [\python-kasa#963](python-kasa#963) (@sdb9696)
- Add time sync command [\python-kasa#951](python-kasa#951) (@rytilahti)
- Make device initialisation easier by reducing required imports [\python-kasa#936](python-kasa#936) (@sdb9696)
- Fix set\_state for common light modules [\python-kasa#929](python-kasa#929) (@sdb9696)
- Add state feature for iot devices [\python-kasa#924](python-kasa#924) (@rytilahti)
- Add post update hook to module and use in smart LightEffect [\python-kasa#921](python-kasa#921) (@sdb9696)
- Add LightEffect module for smart light strips [\python-kasa#918](python-kasa#918) (@sdb9696)
- Add light presets common module to devices. [\python-kasa#907](python-kasa#907) (@sdb9696)
- Improve categorization of features [\python-kasa#904](python-kasa#904) (@rytilahti)
- Create common interfaces for remaining device types [\python-kasa#895](python-kasa#895) (@sdb9696)
- Make get\_module return typed module [\python-kasa#892](python-kasa#892) (@sdb9696)
- Add LightEffectModule for dynamic light effects on SMART bulbs [\python-kasa#887](python-kasa#887) (@sdb9696)
- Implement choice feature type [\python-kasa#880](python-kasa#880) (@rytilahti)
- Add Fan interface for SMART devices [\python-kasa#873](python-kasa#873) (@sdb9696)
- Improve temperature controls [\python-kasa#872](python-kasa#872) (@rytilahti)
- Add precision\_hint to feature [\python-kasa#871](python-kasa#871) (@rytilahti)
- Be more lax on unknown SMART devices [\python-kasa#863](python-kasa#863) (@rytilahti)
- Handle paging of partial responses of lists like child\_device\_info [\python-kasa#862](python-kasa#862) (@sdb9696)
- Better firmware module support for devices not connected to the internet [\python-kasa#854](python-kasa#854) (@sdb9696)
- Re-query missing responses after multi request errors [\python-kasa#850](python-kasa#850) (@sdb9696)
- Implement action feature [\python-kasa#849](python-kasa#849) (@rytilahti)
- Add temperature control module for smart [\python-kasa#848](python-kasa#848) (@rytilahti)
- Implement feature categories [\python-kasa#846](python-kasa#846) (@rytilahti)
- Expose IOT emeter info as features [\python-kasa#844](python-kasa#844) (@rytilahti)
- Add support for feature units [\python-kasa#843](python-kasa#843) (@rytilahti)
- Add ColorModule for smart devices [\python-kasa#840](python-kasa#840) (@sdb9696)
- Add colortemp feature for iot devices [\python-kasa#827](python-kasa#827) (@rytilahti)
- Add support for firmware module v1 [\python-kasa#821](python-kasa#821) (@sdb9696)
- Add colortemp module [\python-kasa#814](python-kasa#814) (@rytilahti)
- Add iot brightness feature [\python-kasa#808](python-kasa#808) (@sdb9696)
- Revise device initialization and subsequent updates [\python-kasa#807](python-kasa#807) (@rytilahti)
- Add brightness module [\python-kasa#806](python-kasa#806) (@rytilahti)
- Support multiple child requests [\python-kasa#795](python-kasa#795) (@sdb9696)
- Support for on\_off\_gradually v2+ [\python-kasa#793](python-kasa#793) (@rytilahti)
- Improve smartdevice update module [\python-kasa#791](python-kasa#791) (@rytilahti)
- Add --child option to feature command [\python-kasa#789](python-kasa#789) (@rytilahti)
- Add temperature\_unit feature to t315 [\python-kasa#788](python-kasa#788) (@rytilahti)
- Add feature for ambient light sensor [\python-kasa#787](python-kasa#787) (@shifty35)
- Add initial support for H100 and T315 [\python-kasa#776](python-kasa#776) (@rytilahti)
- Generalize smartdevice child support [\python-kasa#775](python-kasa#775) (@rytilahti)
- Raise CLI errors in debug mode [\python-kasa#771](python-kasa#771) (@sdb9696)
- Add cloud module for smartdevice [\python-kasa#767](python-kasa#767) (@rytilahti)
- Add firmware module for smartdevice [\python-kasa#766](python-kasa#766) (@rytilahti)
- Add fan module [\python-kasa#764](python-kasa#764) (@rytilahti)
- Add smartdevice module for led controls [\python-kasa#761](python-kasa#761) (@rytilahti)
- Auto auto-off module for smartdevice [\python-kasa#760](python-kasa#760) (@rytilahti)
- Add smartdevice module for smooth transitions [\python-kasa#759](python-kasa#759) (@rytilahti)
- Initial implementation for modularized smartdevice [\python-kasa#757](python-kasa#757) (@rytilahti)
- Let caller handle SMART errors on multi-requests [\python-kasa#754](python-kasa#754) (@sdb9696)
- Add 'shell' command to cli [\python-kasa#738](python-kasa#738) (@rytilahti)

**Fixed bugs:**

- Fix smart led status to report rule status [\python-kasa#1002](python-kasa#1002) (@sdb9696)
- Demote device\_time back to debug [\python-kasa#1001](python-kasa#1001) (@rytilahti)
- Fix to call update when only --device-family passed to cli [\python-kasa#987](python-kasa#987) (@sdb9696)
- Disallow non-targeted device commands [\python-kasa#982](python-kasa#982) (@rytilahti)
- Add supported check to light transition module [\python-kasa#971](python-kasa#971) (@sdb9696)
- Fix switching off light effects for iot lights strips [\python-kasa#961](python-kasa#961) (@sdb9696)
- Add state features to iot strip sockets [\python-kasa#960](python-kasa#960) (@sdb9696)
- Ensure http delay logic works during default login attempt [\python-kasa#959](python-kasa#959) (@sdb9696)
- Fix fan speed level when off and derive smart fan module from common fan interface [\python-kasa#957](python-kasa#957) (@sdb9696)
- Require update in cli for wifi commands [\python-kasa#956](python-kasa#956) (@rytilahti)
- Do not raise on multi-request errors on child devices [\python-kasa#949](python-kasa#949) (@rytilahti)
- Do not show a zero error code when cli exits from showing help [\python-kasa#935](python-kasa#935) (@rytilahti)
- Initialize autooff features only when data is available [\python-kasa#933](python-kasa#933) (@rytilahti)
- Fix P100 errors on multi-requests [\python-kasa#930](python-kasa#930) (@sdb9696)
- Fix potential infinite loop if incomplete lists returned [\python-kasa#920](python-kasa#920) (@sdb9696)
- Add 'battery\_percentage' only when it's available [\python-kasa#906](python-kasa#906) (@rytilahti)
- Add missing alarm volume 'normal' [\python-kasa#899](python-kasa#899) (@rytilahti)
- Use Path.save for saving the fixtures [\python-kasa#894](python-kasa#894) (@rytilahti)
- Fix wifi scan re-querying error [\python-kasa#891](python-kasa#891) (@sdb9696)
- Fix --help on subcommands [\python-kasa#886](python-kasa#886) (@rytilahti)
- Fix smartprotocol response list handler to handle null reponses [\python-kasa#884](python-kasa#884) (@sdb9696)
- Improve feature setter robustness [\python-kasa#870](python-kasa#870) (@rytilahti)
- smartbulb: Limit brightness range to 1-100 [\python-kasa#829](python-kasa#829) (@rytilahti)
- Fix energy module calling get\_current\_power [\python-kasa#798](python-kasa#798) (@sdb9696)
- Fix auto update switch [\python-kasa#786](python-kasa#786) (@rytilahti)
- Retry query on 403 after successful handshake [\python-kasa#785](python-kasa#785) (@sdb9696)
- Ensure connections are closed when cli is finished [\python-kasa#752](python-kasa#752) (@sdb9696)
- Fix for P100 on fw 1.1.3 login\_version none [\python-kasa#751](python-kasa#751) (@sdb9696)
- Pass timeout parameters to discover\_single [\python-kasa#744](python-kasa#744) (@sdb9696)
- Reduce AuthenticationExceptions raising from transports [\python-kasa#740](python-kasa#740) (@sdb9696)
- Do not crash cli on missing discovery info [\python-kasa#735](python-kasa#735) (@rytilahti)
- Fix port-override for aes&klap transports [\python-kasa#734](python-kasa#734) (@rytilahti)
- Fix discovery cli to print devices not printed during discovery timeout [\python-kasa#670](python-kasa#670) (@sdb9696)

**Added support for devices:**

- Add fixture for L920-5\(EU\) 1.0.7 [\python-kasa#972](python-kasa#972) (@rytilahti)
- Add P115 fixture [\python-kasa#950](python-kasa#950) (@rytilahti)
- Add some device fixtures [\python-kasa#948](python-kasa#948) (@rytilahti)
- Add fixture for S505D [\python-kasa#947](python-kasa#947) (@rytilahti)
- Add fixture for p300 1.0.15 [\python-kasa#915](python-kasa#915) (@rytilahti)
- Add H100 1.5.10 and KE100 2.4.0 fixtures [\python-kasa#905](python-kasa#905) (@rytilahti)
- Add fixture for waterleak sensor T300 [\python-kasa#897](python-kasa#897) (@rytilahti)
- Add support for contact sensor \(T110\) [\python-kasa#877](python-kasa#877) (@rytilahti)
- Add support for waterleak sensor \(T300\) [\python-kasa#876](python-kasa#876) (@rytilahti)
- Add support for KH100 hub [\python-kasa#847](python-kasa#847) (@Adriandorr)
- Support for new ks240 fan/light wall switch [\python-kasa#839](python-kasa#839) (@sdb9696)
- Add P100 fw 1.4.0 fixture [\python-kasa#820](python-kasa#820) (@sdb9696)
- Add fixture for P110 sw 1.0.7 [\python-kasa#801](python-kasa#801) (@rytilahti)
- Add updated l530 fixture 1.1.6 [\python-kasa#792](python-kasa#792) (@rytilahti)
- Fix devtools for P100 and add fixture [\python-kasa#753](python-kasa#753) (@sdb9696)
- Add H100 fixtures [\python-kasa#737](python-kasa#737) (@rytilahti)

**Documentation updates:**

- Cleanup README to use the new cli format [\python-kasa#999](python-kasa#999) (@rytilahti)
- Add 0.7 api changes section to docs [\python-kasa#996](python-kasa#996) (@sdb9696)
- Update README to be more approachable for new users [\python-kasa#994](python-kasa#994) (@rytilahti)
- Update docs with more howto examples [\python-kasa#968](python-kasa#968) (@sdb9696)
- Update documentation structure and start migrating to markdown [\python-kasa#934](python-kasa#934) (@sdb9696)
- Add tutorial doctest module and enable top level await [\python-kasa#919](python-kasa#919) (@sdb9696)
- Add warning about tapo watchdog [\python-kasa#902](python-kasa#902) (@rytilahti)
- Move contribution instructions into docs [\python-kasa#901](python-kasa#901) (@rytilahti)
- Add rust tapo link to README [\python-kasa#857](python-kasa#857) (@rytilahti)
- Enable shell extra for installing ptpython and rich [\python-kasa#782](python-kasa#782) (@sdb9696)
- Add WallSwitch device type and autogenerate supported devices docs [\python-kasa#758](python-kasa#758) (@sdb9696)

**Project maintenance:**

- Drop python3.8 support [\python-kasa#992](python-kasa#992) (@rytilahti)
- Remove anyio dependency from pyproject.toml [\python-kasa#990](python-kasa#990) (@sdb9696)
- Configure mypy to run in virtual environment and fix resulting issues [\python-kasa#989](python-kasa#989) (@sdb9696)
- Better checking of child modules not supported by parent device [\python-kasa#966](python-kasa#966) (@sdb9696)
- Use freezegun for testing aes http client delays [\python-kasa#954](python-kasa#954) (@sdb9696)
- Fix passing custom port for dump\_devinfo [\python-kasa#938](python-kasa#938) (@rytilahti)
- Update release playbook [\python-kasa#932](python-kasa#932) (@rytilahti)
- Deprecate device level light, effect and led attributes [\python-kasa#916](python-kasa#916) (@sdb9696)
- Update cli to use common modules and remove iot specific cli testing [\python-kasa#913](python-kasa#913) (@sdb9696)
- Deprecate is\_something attributes [\python-kasa#912](python-kasa#912) (@sdb9696)
- Make Light and Fan a common module interface [\python-kasa#911](python-kasa#911) (@sdb9696)
- Rename bulb interface to light and move fan and light interface to interfaces [\python-kasa#910](python-kasa#910) (@sdb9696)
- Make module names consistent and remove redundant module casting [\python-kasa#909](python-kasa#909) (@sdb9696)
- Add child devices from hubs to generated list of supported devices [\python-kasa#898](python-kasa#898) (@sdb9696)
- Update interfaces so they all inherit from Device [\python-kasa#893](python-kasa#893) (@sdb9696)
- Update ks240 fixture with child device query info [\python-kasa#890](python-kasa#890) (@sdb9696)
- Use pydantic.v1 namespace on all pydantic versions [\python-kasa#883](python-kasa#883) (@rytilahti)
- Update dump\_devinfo to print original exception stack on errors. [\python-kasa#882](python-kasa#882) (@sdb9696)
- Put modules back on children for wall switches [\python-kasa#881](python-kasa#881) (@sdb9696)
- Fix pypy39 CI cache on macos [\python-kasa#868](python-kasa#868) (@sdb9696)
- Do not try coverage upload for pypy [\python-kasa#867](python-kasa#867) (@sdb9696)
- Add runner.arch to cache-key in CI [\python-kasa#866](python-kasa#866) (@sdb9696)
- Fix broken CI due to missing python version on macos-latest [\python-kasa#864](python-kasa#864) (@sdb9696)
- Fix incorrect state updates in FakeTestProtocols [\python-kasa#861](python-kasa#861) (@sdb9696)
- Embed FeatureType inside Feature [\python-kasa#860](python-kasa#860) (@rytilahti)
- Include component\_nego with child fixtures [\python-kasa#858](python-kasa#858) (@sdb9696)
- Use brightness module for smartbulb [\python-kasa#853](python-kasa#853) (@rytilahti)
- Ignore system environment variables for tests [\python-kasa#851](python-kasa#851) (@rytilahti)
- Remove mock fixtures [\python-kasa#845](python-kasa#845) (@rytilahti)
- Enable and convert to future annotations [\python-kasa#838](python-kasa#838) (@sdb9696)
- Update poetry locks and pre-commit hooks [\python-kasa#837](python-kasa#837) (@sdb9696)
- Cache pipx in CI and add custom setup action [\python-kasa#835](python-kasa#835) (@sdb9696)
- Fix non python 3.8 compliant test [\python-kasa#832](python-kasa#832) (@sdb9696)
- Fix CI issue with python version used by pipx to install poetry [\python-kasa#831](python-kasa#831) (@sdb9696)
- Refactor split smartdevice tests to test\_{iot,smart}device [\python-kasa#822](python-kasa#822) (@rytilahti)
- Add pre-commit caching and fix poetry extras cache [\python-kasa#817](python-kasa#817) (@sdb9696)
- Fix slow aestransport and cli tests [\python-kasa#816](python-kasa#816) (@sdb9696)
- Do not run coverage on pypy and cache poetry envs [\python-kasa#812](python-kasa#812) (@sdb9696)
- Update test framework for dynamic parametrization [\python-kasa#810](python-kasa#810) (@sdb9696)
- Put child fixtures in subfolder [\python-kasa#809](python-kasa#809) (@sdb9696)
- Simplify device \_\_repr\_\_ [\python-kasa#805](python-kasa#805) (@rytilahti)
- Add T315 fixture, tests for humidity&temperature modules [\python-kasa#802](python-kasa#802) (@rytilahti)
- Do not fail fast on pypy CI jobs [\python-kasa#799](python-kasa#799) (@sdb9696)
- Update dump\_devinfo to collect child device info [\python-kasa#796](python-kasa#796) (@sdb9696)
- Refactor test framework [\python-kasa#794](python-kasa#794) (@sdb9696)
- Add missing firmware module import [\python-kasa#774](python-kasa#774) (@rytilahti)
- Fix dump\_devinfo scrubbing for ks240 [\python-kasa#765](python-kasa#765) (@rytilahti)
- Rename and deprecate exception classes [\python-kasa#739](python-kasa#739) (@sdb9696)
- Refactor devices into subpackages and deprecate old names [\python-kasa#716](python-kasa#716) (@sdb9696)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sdb9696 sdb9696 sdb9696 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rytilahti @sdb9696
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.