LightMixin
- class meross_iot.controller.mixins.light.LightMixin(device_uuid: str, manager, **kwargs)
Mixin class that enables light control.
- async async_set_light_color(channel: int = 0, onoff: bool | None = None, rgb: Tuple[int, int, int] | None = None, luminance: int | None = None, temperature: int | None = None, timeout: float | None = None, *args, **kwargs) None
Controls the light color of the given bulb. Please note that the __onoff parameter is ignored if the device supports Toggle or ToggleX operations__.
- Parameters:
channel – channel to control (for bulbs it’s usually 0)
onoff – when True, the device will be turned on, when false, it will turned off. This parameter is ignored if the operating device must be controlled via ToggleX or Toggle command.
rgb – (red,green,blue) tuple, where each color is an integer from 0-to-255
luminance – Light intensity (at least on MSL120). Varies from 0 to 100
temperature – Light temperature. Can be used when rgb is not specified.
- Returns:
None
- get_color_temperature(channel=0, *args, **kwargs) int | None
Returns the current color_temperature
- Parameters:
channel – channel to control, defaults to 0 (bulbs generally have only one channel)
- Returns:
an integer value from 0 to 100
- get_light_is_on(channel=0, *args, **kwargs) bool | None
Returns True if the light is ON, False otherwise.
- Parameters:
channel – channel to control, defaults to 0 (bulbs generally have only one channel)
- Returns:
current onoff state
- get_luminance(channel=0, *args, **kwargs) int | None
Returns the current brightness intensity of the bulb
- Parameters:
channel – channel to control, defaults to 0 (bulbs generally have only one channel)
- Returns:
an integer value from 0 to 100
- get_rgb_color(channel=0, *args, **kwargs) Tuple[int, int, int] | None
Returns the current RGB configuration of the device.
- Parameters:
channel – channel to control, defaults to 0 (bulbs generally have only one channel)
- Returns:
a Tuple containing three integer 8bits values (red, green, blue)
- get_supports_luminance(channel: int = 0) bool
Tells if the current device supports luminance capability
- Parameters:
channel – channel to get info from, defaults to 0
- Returns:
True if the current device supports luminance mode, False otherwise.
- get_supports_rgb(channel: int = 0) bool
Tells if the current device supports RGB capability
- Parameters:
channel – channel to get info from, defaults to 0
- Returns:
True if the current device supports RGB color, False otherwise.
- get_supports_temperature(channel: int = 0) bool
Tells if the current device supports temperature color capability
- Parameters:
channel – channel to get info from, defaults to 0
- Returns:
True if the current device supports temperature mode, False otherwise.