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

KeyError: '-1008' is raised when setting only either the hue or saturation in the setColor() function for L530 bulbs #110

Open
MonicaisHer opened this issue Apr 18, 2023 · 0 comments

Comments

@MonicaisHer
Copy link

MonicaisHer commented Apr 18, 2023

When setting only one of the hue or saturation for the Tapo L530 bulb, the setColor() function throws a KeyError: '-1008' error. It would be useful if the function could accept setting only the hue or saturation, as there may be a scenario where the hue is already set and the user only wants to modify the saturation.

Perhaps some code similar to the following could be added to the setColor() function:

Payload = {
    "method": "set_device_info",
    "params":{}
}
if hue is not None:
    Payload["params"]["hue"] = hue
if saturation is not None:
    Payload["params"]["saturation"] = saturation
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

No branches or pull requests

1 participant