miio.integrations.genericmiot.status module
- class miio.integrations.genericmiot.status.GenericMiotStatus(response, dev)[source]
Bases:
DeviceStatus
Generic status for miot devices.
- descriptors() DescriptorCollection[PropertyDescriptor]
Return the dict of sensors exposed by the status container.
Use @sensor and @setting decorators to define properties.
- embed(name: str, other: DeviceStatus)
Embed another status container to current one.
This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.
Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.
- property_dict() Dict[str, MiotProperty] [source]
Return name-keyed dictionary of properties.
- property data
Implemented to support json output.
- property device: GenericMiot
Return the device which returned this status.