Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Combine smart{plug,light} into smartdevice #747

Closed
@rytilahti

Description

@rytilahti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions