You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
This will make it simple for downstream users to construct device
instances for all supported devices given only the host and its token.
All device subclasses register themselves automatically to the factory.
The create(host, token, model=None) class method is the main entry point
to use this.
Supersedes #1328Fixes#1117
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 themiIO.info
query). This issue depends on #1116.Potential signature for the factory method:
The text was updated successfully, but these errors were encountered: