light#

class platypush.message.event.light.LightAnimationStartedEvent(*args, animation, lights: list | None = None, groups: list | None = None, **kwargs)[source]#

Bases: LightEvent

Event triggered when a light animation is started.

__init__(*args, animation, lights: list | None = None, groups: list | None = None, **kwargs)[source]#
Parameters:

plugin_name – Name of the platypush.plugins.light.LightPlugin instance that triggered the event.

class platypush.message.event.light.LightAnimationStoppedEvent(*args, animation=None, lights: list | None = None, groups: list | None = None, **kwargs)[source]#

Bases: LightEvent

Event triggered when a light animation is stopped.

__init__(*args, animation=None, lights: list | None = None, groups: list | None = None, **kwargs)[source]#
Parameters:

plugin_name – Name of the platypush.plugins.light.LightPlugin instance that triggered the event.

class platypush.message.event.light.LightEvent(*args, plugin_name: str | None = None, **kwargs)[source]#

Bases: Event

Base class for light plugins events.

__init__(*args, plugin_name: str | None = None, **kwargs)[source]#
Parameters:

plugin_name – Name of the platypush.plugins.light.LightPlugin instance that triggered the event.

class platypush.message.event.light.LightStatusChangeEvent(light_id=None, light_name=None, on=None, bri=None, sat=None, hue=None, ct=None, xy=None, *args, **kwargs)[source]#

Bases: LightEvent

Event triggered when the state of a lightbulb changes

__init__(light_id=None, light_name=None, on=None, bri=None, sat=None, hue=None, ct=None, xy=None, *args, **kwargs)[source]#
Parameters:
  • light_id (int) – Light ID that triggered the event

  • light_name (str) – Light name that triggered the event

  • on (bool) – Set if the power state of the bulb changed

  • bri (int) – Set if the brightness state of the bulb changed

  • sat (int) – Set if the saturation state of the bulb changed

  • hue (int) – Set if the hue state of the bulb changed

  • ct (int) – Set if the color temperature state of the bulb changed

  • xy (list) – Set if the color of the bulb (expressed in XY coordinates) has changed