Closed
Description
There is no way to initialize an implementation for the given model, forcing downstreams to hardcode imports & initialization for specific devices. There is also currently no way to obtain a list of supported models, which can be useful for other tasks.
The goal of this issue is two-fold: 1) provide a registry that allows accessing the information about supported devices and 2) provide facilities to allow initializing device-derived implementations for a given host&token combination (with optional model
to skip the miIO.info
query). This issue depends on #1116.
Potential signature for the factory method:
class Device:
@classmethod
def create(cls, host, token, model=None):
pass
Metadata
Metadata
Assignees
Labels
No labels