miio.devicefactory module
- class miio.devicefactory.DeviceFactory[source]
Bases:
object
A helper class to construct devices based on their info responses.
This class keeps list of supported integrations and models to allow creating
Device
instances without knowing anything except the host and the token.create()
is the main entry point when using this module. Example:from miio import DeviceFactory dev = DeviceFactory.create("127.0.0.1", 32*"0")
- classmethod class_for_model(model: str)[source]
Return implementation class for the given model, if available.