Commit Graph

38 Commits

Author SHA1 Message Date
Teemu R.
5b8447c940 Prepare 0.11.0 (#1776)
## [0.11.0](https://github.com/python-kasa/python-kasa/tree/0.11.0)
(2026-10-04)

[Full
Changelog](https://github.com/python-kasa/python-kasa/compare/0.10.2...0.11.0)

**Release summary:**

This is a huge and long overdue release, coming more than a year and a
half after the previous one.
Hopefully the next one follows sooner, as the TPAP transport (which did
not make it into this release) is used more and more on newer devices.

This release brings broader camera support, new modules for lights,
vacuums and cameras, and many connectivity fixes for newer firmware
versions. Some other highlights:
- Improved Tapo camera support: login version 3, presets, wifi handling,
last alert detection, and more robust authentication and discovery.
- Selective room cleaning for robot vacuums.
- Configurable light strip length via the new strip segment module, and
an exposed light transition state change flag.
- Basic HomeKit module for Kasa (iot) devices.
- Energy monitoring V2 support (S515D).
- Better hub and thermostat state reporting (hold, summer mode, low
battery).
- Connection fixes for newer Tapo firmware and older SSL devices, plus
KLAP v2 for iot devices.
- More resilient time handling, with failover and UTC fallback for iot
devices.
- Python 3.14 is now supported.
- Inclusion of fixtures for 29 devices or firmware versions, including
the Tapo C460, C200 and C101 cameras and the KH100 hub with KE100/KE110
thermostats.

**Thank you to all contributors!**

A big thank you to everyone who contributed to this release, whether
through code, device fixtures, bug reports or testing.

Special thanks to @ZeliardM for a huge effort on both features and
project maintenance, including but not limited to:
- Features like the HomeKit module for iot devices, iot time module
failover, wifi handling and credential improvements for cameras, Tapo
login version 3, and V2 energy monitoring for S515D.
- A lot of necessary maintenance work including type annotations and
cleanups throughout the test suite, modernized docstrings, CI hardening
with SHA-pinned actions, and many bug fixes. This helps us to keep the
library maintainable and open to new contributions.

A warm welcome to our new contributors, with special thanks to those who
contributed improvements and fixes:
- @alams154: discovery on port 20004
- @bluntman001: iot device classification fix
- @bm1549: KLAP v2 transport for iot devices
- @darylldelfin: cipher support for newer Tapo firmware
- @davidefiocco: vacuum mop water level fix
- @epg-pers: selective room cleaning for vacuums
- @freeKC: camera discovery and authentication fixes
- @gpongelli: extended camera detection
- @Ikstar: KL420 color temperature range
- @juherr: last alert detection module for cameras, camera error codes
and a C200 fixture
- @kad: SSL connections to older devices
- @KaloyanNaumov: multi-request timeout handling
- @loganrosen: KL400L5 color temperature range
- @markvanpraet: Tapo C460 support and camera battery fix
- @monteccarlos: iot timezone mapping fix
- @mrwogu: preset support for Tapo cameras
- @nopoz: strip segment module, light transition flag and credentials
hash fix
- @tk1475: UTC fallback for unset iot device clocks
- @wh1t3f1r3: non-retryable network error handling

Thanks also to our new contributors who provided device fixtures to help
future development efforts: @emanueleg, @fantandrea, @HarryPehkonen,
@ijaron, @Krotu, @LostLuma, @mjbohr and @TheLinuxGuy.

**This release in numbers:**

- 68 merged pull requests from 29 contributors, 27 of them first-time
contributors
- 8 new modules
- 29 new device fixtures
- 203 files changed, with 25,199 lines added and 2,585 removed


**Implemented enhancements:**

- \[Feature Request\] C220 camera line crossing detection on-off switch
[\#1551](https://github.com/python-kasa/python-kasa/issues/1551)
- SslAesTransport: handshake again when a camera answers 401 to
passthrough
[\#1771](https://github.com/python-kasa/python-kasa/pull/1771) (@freeKC)
- Add LastAlertDetection module for smartcam devices
[\#1762](https://github.com/python-kasa/python-kasa/pull/1762) (@juherr)
- Add KL420 to TPLINK\_KELVIN color temperature ranges
[\#1757](https://github.com/python-kasa/python-kasa/pull/1757) (@Ikstar)
- Do not authenticate with a credentials\_hash from a different
transport [\#1749](https://github.com/python-kasa/python-kasa/pull/1749)
(@nopoz)
- Expose the light transition state change flag
[\#1745](https://github.com/python-kasa/python-kasa/pull/1745) (@nopoz)
- Add strip segment module for configurable light strip length
[\#1744](https://github.com/python-kasa/python-kasa/pull/1744) (@nopoz)
- Add KL400L5 color temperature range
[\#1719](https://github.com/python-kasa/python-kasa/pull/1719)
(@loganrosen)
- Update smartcam credential handling and tests
[\#1664](https://github.com/python-kasa/python-kasa/pull/1664)
(@ZeliardM)
- Add support for V2 Energy Monitoring for S515D
[\#1663](https://github.com/python-kasa/python-kasa/pull/1663)
(@ZeliardM)
- Add selective room cleaning to vacuum clean module
[\#1660](https://github.com/python-kasa/python-kasa/pull/1660)
(@epg-pers)
- New Wi-Fi handling for SMARTCAM devices
[\#1639](https://github.com/python-kasa/python-kasa/pull/1639)
(@ZeliardM)
- Add support for tapo login\_version 3 in sslaestransport
[\#1638](https://github.com/python-kasa/python-kasa/pull/1638)
(@ZeliardM)
- Add preset support for Tapo cameras
[\#1615](https://github.com/python-kasa/python-kasa/pull/1615) (@mrwogu)
- Add python 3.14 to supported versions
[\#1599](https://github.com/python-kasa/python-kasa/pull/1599)
(@rytilahti)
- Add discovery port 20004
[\#1595](https://github.com/python-kasa/python-kasa/pull/1595)
(@alams154)
- Implement IOT Time Module Failover
[\#1583](https://github.com/python-kasa/python-kasa/pull/1583)
(@ZeliardM)
- Add bare bones homekit module for iot devices
[\#1566](https://github.com/python-kasa/python-kasa/pull/1566)
(@ZeliardM)
- Extend smartcam detection support
[\#1552](https://github.com/python-kasa/python-kasa/pull/1552)
(@gpongelli)

**Fixed bugs:**

- Time module unavailable for waterleak sensor
[\#1613](https://github.com/python-kasa/python-kasa/issues/1613)
- 'No time zone found with key EST' in debian 13
[\#1579](https://github.com/python-kasa/python-kasa/issues/1579)
- Discovery: accept cameras that only send the encrypt\_type list
[\#1770](https://github.com/python-kasa/python-kasa/pull/1770) (@freeKC)
- Classify IOT devices via sysinfo regardless of transport \(fixes
\#1740\) [\#1769](https://github.com/python-kasa/python-kasa/pull/1769)
(@bluntman001)
- Fall back to UTC for iot time when the device clock is not set
[\#1768](https://github.com/python-kasa/python-kasa/pull/1768) (@tk1475)
- Add UNKNOWN\_USERNAME \(-60502\) camera error code
[\#1761](https://github.com/python-kasa/python-kasa/pull/1761) (@juherr)
- Disable multi requests on timeout during multi-request
[\#1759](https://github.com/python-kasa/python-kasa/pull/1759)
(@KaloyanNaumov)
- Add ECDHE-RSA-AES256 cipher for newer Tapo firmware
[\#1755](https://github.com/python-kasa/python-kasa/pull/1755)
(@darylldelfin)
- Map iot timezone index 18 to America/New\_York instead of EST
[\#1743](https://github.com/python-kasa/python-kasa/pull/1743)
(@monteccarlos)
- fix: use KLAP v2 transport for IOT devices with login version 2
[\#1731](https://github.com/python-kasa/python-kasa/pull/1731) (@bm1549)
- Add ENETUNREACH to non-retryable errors in XorTransport
[\#1668](https://github.com/python-kasa/python-kasa/pull/1668)
(@wh1t3f1r3)
- Fix mop set\_waterlevel sending setCleanAttr without type field
[\#1667](https://github.com/python-kasa/python-kasa/pull/1667)
(@davidefiocco)
- Fix SMARTCAM Time module and update tests
[\#1659](https://github.com/python-kasa/python-kasa/pull/1659)
(@ZeliardM)
- Fix camera login version in CLI
[\#1658](https://github.com/python-kasa/python-kasa/pull/1658)
(@ZeliardM)
- Allow SSL connections to older devices
[\#1654](https://github.com/python-kasa/python-kasa/pull/1654) (@kad)
- waterleaksensor: use parent's Time for alert timestamp
[\#1614](https://github.com/python-kasa/python-kasa/pull/1614)
(@rytilahti)
- Add hold state to thermostatstate
[\#1609](https://github.com/python-kasa/python-kasa/pull/1609)
(@rytilahti)
- Fix thermostat idle reporting on low battery
[\#1598](https://github.com/python-kasa/python-kasa/pull/1598)
(@rytilahti)
- Add shutdown \(summer mode\) to thermostatstate
[\#1588](https://github.com/python-kasa/python-kasa/pull/1588)
(@rytilahti)
- Fix iotstrip child device time handling
[\#1584](https://github.com/python-kasa/python-kasa/pull/1584)
(@ZeliardM)

**Added support for devices:**

- Add C200 device fixture
[\#1760](https://github.com/python-kasa/python-kasa/pull/1760) (@juherr)
- Add P125M fixture for firmware 1.4.4
[\#1746](https://github.com/python-kasa/python-kasa/pull/1746)
(@HarryPehkonen)
- Add fixtures for KH100, KE100 and KE110 and simulate TRV states
[\#1726](https://github.com/python-kasa/python-kasa/pull/1726) (@Krotu)
- Add L530EA\(EU\) device fixture
[\#1694](https://github.com/python-kasa/python-kasa/pull/1694)
(@ZeliardM)
- Add C101 test fixture
[\#1673](https://github.com/python-kasa/python-kasa/pull/1673) (@ijaron)
- Add LB130\(US\) device fixture
[\#1669](https://github.com/python-kasa/python-kasa/pull/1669)
(@ZeliardM)
- Add KL110B\(UN\) device fixture
[\#1657](https://github.com/python-kasa/python-kasa/pull/1657)
(@ZeliardM)
- Add TS15\(US\) device fixture
[\#1649](https://github.com/python-kasa/python-kasa/pull/1649)
(@ZeliardM)
- Add Tapo C460 support
[\#1645](https://github.com/python-kasa/python-kasa/pull/1645)
(@markvanpraet)
- Add P105\(US\) device fixture
[\#1644](https://github.com/python-kasa/python-kasa/pull/1644)
(@ZeliardM)
- Add L430C\(EU\) device fixture
[\#1643](https://github.com/python-kasa/python-kasa/pull/1643)
(@ZeliardM)
- Add L430P\(EU\) device fixture
[\#1607](https://github.com/python-kasa/python-kasa/pull/1607)
(@LostLuma)
- Add S500\(US\)\_1.0\_1.2.0 fixture
[\#1569](https://github.com/python-kasa/python-kasa/pull/1569)
(@ZeliardM)
- Add device fixture for P316M\(US\)
[\#1568](https://github.com/python-kasa/python-kasa/pull/1568)
(@TheLinuxGuy)
- Add L535E\(EU\) 3.0 1.1.8 fixture
[\#1545](https://github.com/python-kasa/python-kasa/pull/1545)
(@fantandrea)
- Adding KL400L10\(US\)\_1.0\_1.0.10 fixture
[\#1539](https://github.com/python-kasa/python-kasa/pull/1539) (@mjbohr)
- Add TP10\(IT\) 1.0 1.2.5 fixture
[\#1538](https://github.com/python-kasa/python-kasa/pull/1538)
(@emanueleg)
- Add LB100\(US\)\_1.0\_1.8.11 fixture file
[\#1515](https://github.com/python-kasa/python-kasa/pull/1515)
(@ZeliardM)
- Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5
[\#1509](https://github.com/python-kasa/python-kasa/pull/1509)
(@ZeliardM)

**Documentation updates:**

- How to hash credentials to make use of --credentials-hash flag?
[\#1517](https://github.com/python-kasa/python-kasa/issues/1517)
- docs: modernize docstrings across the repository
[\#1682](https://github.com/python-kasa/python-kasa/pull/1682)
(@ZeliardM)
- Add a note to emeter guide being kasa-only
[\#1512](https://github.com/python-kasa/python-kasa/pull/1512)
(@rytilahti)

**Project maintenance:**

- tests: add type annotations to top-level test files
[\#1688](https://github.com/python-kasa/python-kasa/pull/1688)
(@ZeliardM)
- tests: add type annotations to CLI, protocol, and smartcam tests
[\#1687](https://github.com/python-kasa/python-kasa/pull/1687)
(@ZeliardM)
- tests: add type annotations to Smart tests
[\#1686](https://github.com/python-kasa/python-kasa/pull/1686)
(@ZeliardM)
- tests: add type annotations to IoT tests
[\#1685](https://github.com/python-kasa/python-kasa/pull/1685)
(@ZeliardM)
- tests: add type annotations to transport tests
[\#1684](https://github.com/python-kasa/python-kasa/pull/1684)
(@ZeliardM)
- tests: centralize transport and session cleanup in conftest
[\#1683](https://github.com/python-kasa/python-kasa/pull/1683)
(@ZeliardM)
- ci: pin all GitHub Actions to SHA hashes and update versions
[\#1681](https://github.com/python-kasa/python-kasa/pull/1681)
(@ZeliardM)
- tests: fix typos, child device subtype, CLI patch path, and
deprecation test logic
[\#1677](https://github.com/python-kasa/python-kasa/pull/1677)
(@ZeliardM)
- Update GitHub Workflows and Actions
[\#1622](https://github.com/python-kasa/python-kasa/pull/1622)
(@ZeliardM)
- Use log-level debug for smartdevice query error reporting
[\#1587](https://github.com/python-kasa/python-kasa/pull/1587)
(@rytilahti)
- Use Device instead of SmartDevice where feasible
[\#1585](https://github.com/python-kasa/python-kasa/pull/1585)
(@ZeliardM)

**Closed issues:**

- Python 3.14 Support
[\#1597](https://github.com/python-kasa/python-kasa/issues/1597)
- HS300 Child State - Time Module Error
[\#1445](https://github.com/python-kasa/python-kasa/issues/1445)
2026-10-04 20:03:52 +02:00
Peter Arapov
7164ef7a66 Add KL420 to TPLINK_KELVIN color temperature ranges (#1757)
Adds the `KL420` series to `TPLINK_KELVIN` to support wider color temperature ranges (2500-9000K as supported by the device).
While older firmware (1.0.2) reported is_variable_color_temp: 0, firmware 1.0.7 enables variable color temperature support.
2026-09-18 15:38:08 +02:00
Logan Rosen
a29d0610ba Add KL400L5 color temperature range (#1719)
Some checks failed
CI / Perform Lint Checks (3.14) (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
Stale / stale (push) Has been cancelled
- add the KL400L5 color temperature range used by newer firmware
- add a KL400L5(US) 1.0.11 fixture that reports variable color
temperature support
- categorize that fixture as variable color temperature while keeping
older KL400L5 fixtures non-variable
- The Tapo app exposes 2500K-9000K for these KL400L5 strips, so this PR
uses that app-visible range.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-18 16:02:57 +02:00
ZeliardM
bb27a43027 docs: modernize docstrings across the repository (#1682)
Comprehensive docstring cleanup across the repository — fix Sphinx
cross-references, Python REPL continuation syntax, stale class names,
and modernize the IotBulb docstring to use the
`Module.Light`/`Module.LightPreset` interface.
2026-07-05 18:30:01 +02:00
Steven B.
955e7ab4d0 Migrate TurnOnBehaviours to mashumaro (#1285) 2024-11-20 15:35:51 +01:00
Steven B.
03c073c293 Migrate IotLightPreset to mashumaru (#1275) 2024-11-20 08:37:04 +00:00
Steven B.
a01247d48f Remove support for python <3.11 (#1273)
Python 3.11 ships with latest Debian Bookworm. 
pypy is not that widely used with this library based on statistics. It could be added back when pypy supports python 3.11.
2024-11-18 18:46:36 +00:00
Steven B.
e55731c110 Move protocol modules into protocols package (#1254) 2024-11-13 17:50:21 +00:00
Teemu R.
66eb17057e Enable ruff check for ANN (#1139) 2024-11-10 18:55:13 +00:00
Steven B.
673a32258f Make HSV NamedTuple creation more efficient (#1211) 2024-10-29 17:14:52 +00:00
Steven B.
7fd8c14c1f Create common Time module and add time set cli command (#1157) 2024-10-15 08:59:25 +01:00
Teemu R.
73b6d16074 Extend KL135 ct range up to 9000K (#1123) 2024-09-21 16:29:25 +01:00
Teemu R.
6a86ffbbba Add flake8-pytest-style (PT) for ruff (#1105)
This will catch common issues with pytest code.

* Use `match` when using `pytest.raises()` for base exception types like
`TypeError` or `ValueError`
* Use tuples for `parametrize()`
* Enforces `pytest.raises()` to contain simple statements, using `noqa`
to skip this on some cases for now.
* Fixes incorrect exception type (valueerror instead of typeerror) for
iotdimmer.
* Adds check valid types for `iotbulb.set_hsv` and `color` smart module.
* Consolidate exception messages for common interface modules.
2024-08-30 17:30:07 +02:00
Steven B.
31ec27c1c8 Fix iot light effect brightness (#1092)
Fixes issue where the brightness of the `iot` light effect is set properly
on the light effect but read back incorrectly from the light.
2024-07-31 15:58:48 +01:00
Steven B.
cb0077f634 Do not send light_on value to iot bulb set_state (#1090)
Passing this extra value caused the `ignore_default` check in the `IotBulb._set_light_state`
method to fail which causes the device to come back on to the default state.
2024-07-31 15:56:07 +01:00
Steven B.
cb7e904d30 Enable setting brightness with color temp for smart devices (#1091) 2024-07-31 15:52:27 +01:00
Steven B
b4a6df2b5c Add common energy module and deprecate device emeter attributes (#976)
Consolidates logic for energy monitoring across smart and iot devices.
Deprecates emeter attributes in favour of common names.
2024-06-17 11:22:05 +01:00
Steven B
db6e335346 Fix set_state for common light modules (#929)
PR contains a number of fixes from testing with HA devices:

- Fixes a bug with turning the light on and off via `set_state`
- Aligns `set_brightness` behaviour across `smart` and `iot` devices
such that a value of 0 is off.
- Aligns `set_brightness` behaviour for `IotDimmer` such that setting
the brightness turns on the device with a transition of 1ms. ([HA
comment](https://github.com/home-assistant/core/pull/117839#discussion_r1608720006))
- Fixes a typing issue in `LightState`.
- Adds `ColorTempRange` and `HSV` to `__init__.py`
- Adds a `state` property to the interface returning `LightState` for
validating `set_state` changes.
- Adds tests for `set_state`
2024-05-22 15:33:55 +02:00
Steven B
273c541fcc Add light presets common module to devices. (#907)
Adds light preset common module for switching to presets and saving presets.
Deprecates the `presets` attribute and `save_preset` method from the `bulb` 
interface in favour of the modular approach.  Allows setting preset for `iot` 
which was not previously supported.
2024-05-19 11:20:18 +01:00
Steven B
3490a1ef84 Add tutorial doctest module and enable top level await (#919)
Add a tutorial module with examples that can be tested with `doctest`.

In order to simplify the examples they can be run with doctest allowing
top level await statements by adding a fixture to patch the builtins
that xdoctest uses to test code.

---------

Co-authored-by: Teemu R. <tpr@iki.fi>
2024-05-16 18:13:44 +02:00
Steven B
a2e8d2c4e8 Deprecate device level light, effect and led attributes (#916)
Deprecates the attributes at device level for light, light effects, and led. i.e. device.led, device.is_color. Will continue to support consumers using these attributes and emit a warning.
2024-05-15 18:49:08 +01:00
Steven B
ef49f44eac Deprecate is_something attributes (#912)
Deprecates the is_something attributes like is_bulb and is_dimmable in favour of the modular approach.
2024-05-13 18:52:08 +01:00
Steven B
33d839866e Make Light and Fan a common module interface (#911) 2024-05-13 17:34:44 +01:00
Steven B
d7b00336f4 Rename bulb interface to light and move fan and light interface to interfaces (#910)
Also rename BulbPreset to LightPreset.
2024-05-11 19:40:08 +01:00
Steven B
f259a8f162 Make module names consistent and remove redundant module casting (#909)
Address the inconsistent naming of smart modules by removing all "Module" suffixes and aligning filenames with class names. Removes the casting of modules to the correct module type now that is is redundant. Update the adding of iot modules to use the ModuleName class rather than a free string.
2024-05-11 19:28:18 +01:00
Teemu R
55653d0346 Improve categorization of features (#904)
This updates the categorization of features and makes the id mandatory for features
2024-05-07 10:13:35 +01:00
Teemu R
5ef81f4669 Improve feature setter robustness (#870)
This adds a test to check that all feature.set_value() calls will cause
a query, i.e., that there are no self.call()s that are not awaited, and
fixes existing code in this context.

This also fixes an issue where it was not possible to print out the
feature if the value threw an exception.
2024-05-02 15:32:06 +02:00
Teemu R
46338ee21d Use pydantic.v1 namespace on all pydantic versions (#883)
With https://github.com/pydantic/pydantic/pull/9042 being shipped with
[1.10.15](https://docs.pydantic.dev/latest/changelog/#v11015-2024-04-03),
we can clean up the imports a bit until we make decisions how to move
onward with or without pydantic.

---------

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-05-01 15:59:35 +02:00
Teemu R
65874c0365 Embed FeatureType inside Feature (#860)
Moves `FeatureType` into `Feature` to make it easier to use the API.
This also enforces that no invalid types are accepted (i.e.,
`Category.Config` cannot be a `Sensor`)
If `--verbose` is used with the cli tool, some extra information is
displayed for features when in the state command.
2024-04-24 18:38:52 +02:00
Steven B
e410e4f3f3 Fix incorrect state updates in FakeTestProtocols (#861) 2024-04-24 12:25:16 +01:00
Teemu R
b860c32d5f Implement feature categories (#846)
Initial implementation for feature categories to help downstreams and
our cli tool to categorize the data for more user-friendly manner. As
more and more information is being exposed through the generic features
interface, it is necessary to give some hints to downstreams about how
might want to present the information to users.

This is not a 1:1 mapping to the homeassistant's mental model, and it
will be necessary to fine-tune homeassistant-specific parameters by
other means to polish the presentation.
2024-04-23 19:20:12 +02:00
Steven B
203bd79253 Enable and convert to future annotations (#838) 2024-04-17 15:39:24 +02:00
Steven B
da441bc697 Update poetry locks and pre-commit hooks (#837)
Also updates CI pypy versions to be 3.9 and 3.10 which are the currently
[supported
versions](https://www.pypy.org/posts/2024/01/pypy-v7315-release.html).
Otherwise latest cryptography doesn't ship with pypy3.8 wheels and is
unable to build on windows.

Also updates the `codecov-action` to v4 which fixed some intermittent
uploading errors.
2024-04-16 20:21:20 +02:00
Teemu R
c08b58cd8b Add colortemp feature for iot devices (#827)
Make color temperature feature available for iot bulbs.
2024-03-26 18:33:10 +00:00
Teemu R
35dbda7049 Change state_information to return feature values (#804)
This changes `state_information` to return the names and values of
all defined features.
It was originally a "temporary" hack to show some extra, device-specific
information in the cli tool, but now that we have device-defined
features we can leverage them.
2024-03-26 19:28:39 +01:00
Steven B
adce92a761 Add iot brightness feature (#808) 2024-03-06 16:45:08 +00:00
Steven B
8c39e81a40 Rename and deprecate exception classes (#739)
# Public #
SmartDeviceException -> KasaException
UnsupportedDeviceException(SmartDeviceException) -> UnsupportedDeviceError(KasaException)
TimeoutException(SmartDeviceException, asyncio.TimeoutError) -> TimeoutError(KasaException, asyncio.TimeoutError)

Add new exception for error codes -> DeviceError(KasaException)
AuthenticationException(SmartDeviceException) -> AuthenticationError(DeviceError)

# Internal #
RetryableException(SmartDeviceException) -> _RetryableError(DeviceError)
ConnectionException(SmartDeviceException) -> _ConnectionError(KasaException)
2024-02-21 16:52:55 +01:00
Steven B
0d119e63d0 Refactor devices into subpackages and deprecate old names (#716)
* Refactor devices into subpackages and deprecate old names

* Tweak and add tests

* Fix linting

* Remove duplicate implementations affecting project coverage

* Update post review

* Add device base class attributes and rename subclasses

* Rename Module to BaseModule

* Remove has_emeter_history

* Fix missing _time in init

* Update post review

* Fix test_readmeexamples

* Fix erroneously duped files

* Clean up iot and smart imports

* Update post latest review

* Tweak Device docstring
2024-02-04 16:20:08 +01:00