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

Replace overheated with the three new fields for plugs #254

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

padenot
Copy link
Contributor

@padenot padenot commented Aug 22, 2024

This should fix #248 while ensuring older devices keep working if the library is updated but not the firmare of the device.

I only have P110 and P115, but updated all other devices -- those are untested but it should be harmless if it hasn't been renamed there.

@padenot
Copy link
Contributor Author

padenot commented Aug 22, 2024

The field has changed from a bool to a string, and we should probably map to an enum, but I don't know of the possible variants just yet, so I've left it as a bool. We can fix this later, this fixes the library.

@padenot
Copy link
Contributor Author

padenot commented Aug 22, 2024

Also it's unclear to me if we want to align the python API, how to make an alias, etc.

@mihai-dinculescu
Copy link
Owner

mihai-dinculescu commented Aug 23, 2024

It would be best to update the plugs only for now and have the field called overheat_status with a non-optional enum.
I've left a comment on #248 with the enum values.

If you're happy to make the Rust changes, I can do the Python ones afterwards.

…eated or overheated_status, make it an enum, and optional
@padenot
Copy link
Contributor Author

padenot commented Aug 26, 2024

It would be best to update the plugs only for now and have the field called overheat_status with a non-optional enum.

Updated. For some reason the up-to-date p110 and p115 don't have this overheated field right now so I left it as optional.

@mihai-dinculescu mihai-dinculescu merged commit db0b90b into mihai-dinculescu:main Aug 26, 2024
16 checks passed
@mihai-dinculescu
Copy link
Owner

Thank you for this.
I’ve reviewed it and made some adjustments that I believe are appropriate, so that it can be released today.

@mihai-dinculescu mihai-dinculescu changed the title Add a serde alias to deserialize from either overheated or overheated_status Replace overheated with the three new fields for plugs Aug 26, 2024
mihai-dinculescu added a commit that referenced this pull request Aug 26, 2024
---------

Co-authored-by: Dinculescu <mihai.dinculescu@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tapo-py :- 0.3.1 getting error while calling get_device_info
2 participants