miio.integrations.lumi.gateway.devices.light module
Xiaomi Zigbee lights.
- class miio.integrations.lumi.gateway.devices.light.LightBulb(gw: Gateway, dev_info: SubDeviceInfo, model_info: Dict | None = None)[source]
Bases:
SubDevice
Base class for subdevice light bulbs.
- get_property(property)
Get the value of a property of the subdevice.
- get_property_exp(properties)
Get the value of a bunch of properties of the subdevice.
- register_callback(id: str, callback: Callable[[str, str], None])
Register a external callback function for updates of this subdevice.
- send(command)
Send a command/query to the subdevice.
- send_arg(command, arguments)
Send a command/query including arguments to the subdevice.
- set_property(property, value)
Set a device property of the subdevice.
- async subscribe_events()
subscribe to all subdevice events using the push server.
- unpair()
Unpair this device from the gateway.
- async unsubscribe_events()
Unsubscibe from events registered in the gateway memory.
- update()
Update all device properties.
- property battery
Return the battery level in %.
- property device_type
Return the device type name.
- property firmware_version
Return the firmware version.
- property model
Return the device model.
- property name
Return the name of the device.
- property status
Return sub-device status as a dict containing all properties.
- property voltage
Return the battery voltage in V.
- property zigbee_model
Return the zigbee device model.