Skip to content
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

driver/power/tplink: use IotStrip instead of deprecated SmartStrip #1431

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bastian-Krause
Copy link
Member

Description
This is a draft because python-kase 0.7.0 requires Python >=3.9, labgrid still supports Python 3.8.

Increase the minimum python-kasa version to 0.7.0. This allows us to use a newly introduced and not deprecated replacement for the kasa.SmartStrip class.

Since python-kasa 0.7.0, the SmartStrip class is deprecated.

The docs state:

"If you want to continue to use the old API for older devices, you can use the classes in the iot module to avoid deprecation warnings."

https://python-kasa.readthedocs.io/en/stable/deprecated.html#deprecated-api-reference

Do that.

Checklist

  • PR has been tested (untested, I don't have the required hardware)

@Bastian-Krause Bastian-Krause added the dependencies Pull requests that update a dependency file label Jun 27, 2024
@Bastian-Krause
Copy link
Member Author

@CardboardTurkey You contributed the original code. Could you take a look at this?

@CardboardTurkey
Copy link
Contributor

This looks reasonable! I'm afraid I no longer have access to the hardware required to test these changes though.

@Bastian-Krause Bastian-Krause marked this pull request as ready for review October 14, 2024 09:43
This allows us to use a newly introduced and not deprecated replacement
for the kasa.SmartStrip class.

Signed-off-by: Bastian Krause <[email protected]>
Since python-kasa 0.7.0, the SmartStrip class is deprecated [1].

The docs state [2]:

  "If you want to continue to use the old API for older devices, you can
  use the classes in the iot module to avoid deprecation warnings."

Do that.

[1] https://python-kasa.readthedocs.io/en/stable/smartstrip.html
[2] https://python-kasa.readthedocs.io/en/stable/deprecated.html#deprecated-api-reference

Signed-off-by: Bastian Krause <[email protected]>
@Bastian-Krause
Copy link
Member Author

Bastian-Krause commented Oct 14, 2024

Rebased on latest master. I think we should merge this "as is".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants