pub enum LightCommand {
Show 15 variants
Alert(AlertEffectType),
Color {
x: f32,
y: f32,
},
ColorTemp(u16),
ColorTempDelta {
action: DeltaAction,
mirek_delta: Option<u16>,
},
Dim(f32),
DimDelta {
action: Option<DeltaAction>,
brightness_delta: Option<f32>,
},
Dynamics {
duration: Option<usize>,
speed: Option<f32>,
},
Gradient {
points: Vec<CIEColor>,
mode: Option<GradientMode>,
},
Effect(EffectType),
Identify,
Metadata {
name: Option<String>,
archetype: Option<ProductArchetype>,
},
On(bool),
PowerUp {
preset: PowerupPresetType,
on: Option<PowerupOnState>,
dimming: Option<PowerupDimming>,
color: Option<PowerupColor>,
},
Signaling {
signal: SignalType,
duration: usize,
colors: Option<SignalColor>,
},
TimedEffect {
effect: TimedEffectType,
duration: Option<usize>,
},
}Expand description
Commands for a Light.
Variants§
Alert(AlertEffectType)
Sets the alert effect for this light.
Color
CIE XY gamut position
ColorTemp(u16)
Color temperature in absolute mirek [153, 500] or null when the light color
is not in the ct spectrum.
ColorTempDelta
Color temperature change in mirek.
Fields
action: DeltaActionmirek_delta: Option<u16>Mirek delta to current mirek [0, 347]. Clip at
mirek_minimum and
mirek_maximum of mirek_schema.
Dim(f32)
Brightness percentage (0.0-100.0]. value cannot be 0, writing
0 changes it to lowest possible brightness.
DimDelta
Brightness change to this light.
Fields
action: Option<DeltaAction>Dynamics
Modifies properties of trasitions and timed effects of this light.
Fields
speed: Option<f32>Speed of dynamic palette or effect.
The speed is valid for the dynamic palette if the status is DynamicsStatus::DynamicPalette or for the corresponding effect listed in status. In case of status None, the speed is not valid.
Gradient
Basic feature containing gradient properties.
Fields
points: Vec<CIEColor>Collection of gradients points. For control of the gradient points through a PUT a minimum of 2 points need to be provided.
mode: Option<GradientMode>Effect(EffectType)
Basic feature containing effect properties.
Identify
Triggers a visual identification sequence, performing one breathe cycle.
Metadata
On(bool)
Power state of this light.
PowerUp
Configures the power-up behavior of this light.
Fields
preset: PowerupPresetTypeWhen setting the custom preset, other properties can be set. For all other presets, no other properties can be included.
on: Option<PowerupOnState>dimming: Option<PowerupDimming>color: Option<PowerupColor>Signaling
Feature containing signaling properties.
Fields
signal: SignalTypeduration: usizeDuration in seconds.
Has a max of 65,534,000ms and a stepsize of 1000ms. Values in between steps will be rounded. Duration is ignored for SignalType::NoSignal.
colors: Option<SignalColor>List of colors (1 or 2) to apply to the signal (not supported by all signals).
TimedEffect
Basic feature containing timed effect properties.
Fields
effect: TimedEffectTypeduration: Option<usize>Duration is mandatory when timed effect is set, except for TimedEffectType::NoEffect. Resolution decreases for a larger duration. e.g Effects with duration smaller than a minute will be rounded to a resolution of 1s, while effects with duration larger than an hour will be rounded up to a resolution of 300,000ms. Duration has a max of 21,600,000ms.