8000 Combine smart{plug,light} into smartdevice · Issue #747 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Combine smart{plug,light} into smartdevice #747

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

Closed
Tracked by #783
rytilahti opened this issue Feb 8, 2024 · 0 comments · Fixed by #874
Closed
Tracked by #783

Combine smart{plug,light} into smartdevice #747

rytilahti opened this issue Feb 8, 2024 · 0 comments · Fixed by #874
Milestone

Comments

@rytilahti
Copy link
Member
rytilahti commented Feb 8, 2024

With a move towards modularized smartdevice (#757), we can get rid of separate files for different device types.
We should probably keep the same interface in place for the time being, but in the future the available "features" (#741) should be enough to decide how the device should be controlled.

For example, KS205 is a wallswitch that allows turning it on and off, but doesn't support a brightness feature like KS225 does (based on the component list). Instead of hard-coding this per device-basis in our discovery machinery to decide which class to initialize, we can expose the set of features for downstream users like homeassistant, which can query if the device supports "brightness" and act accordingly.

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 a pull request may close this issue.

1 participant
0