[−][src]Struct philipshue_edj::hue::LightCommand
Struct for building a command that will be sent to the Hue bridge telling it what to do with a light
View the lights-api documention for more information
Fields
on: Option<bool>
Whether to turn the light off or on
bri: Option<u8>
Brightness of the colour of the light
hue: Option<u16>
The hue of the colour of the light
sat: Option<u8>
The saturation of the colour of the light
xy: Option<(f32, f32)>
The x and y coordinates of a colour in CIE space
ct: Option<u16>
The Mired Color temperature of the light. 2012 connected lights are capable of 153 (6500K) to 500 (2000K).
alert: Option<String>
The alert effect
effect: Option<String>
The dynamic effect of the light. It can be either "none" or "colorloop"
If "colorloop", the light will cycle hues
transitiontime: Option<u16>
The duration of the transition from the light’s current state to the new state.
This is given as a multiple of 100ms and defaults to 4 (400ms). For example, setting transitiontime 10 will make the transition last 1 second.
bri_inc: Option<i16>
Has to be a value between -254 and 254. Increments or decrements the value of the brightness.
sat_inc: Option<i16>
Has to be a value between -254 and 254. Increments or decrements the value of the saturation.
hue_inc: Option<i16>
Has to be a value between -65534 and 65534. Increments or decrements the value of the hue.
ct_inc: Option<i16>
Has to be a value between -65534 and 65534. Increments or decrements the value of the colour temperature.
xy_inc: Option<(i16, i16)>
Increments or decrements the value of the xy.
Methods
impl LightCommand
[src]
pub fn on(self) -> Self
[src]
Returns a LightCommand
that turns a light on
pub fn off(self) -> Self
[src]
Returns a LightCommand
that turns a light on
pub fn with_bri(self, b: u8) -> Self
[src]
Sets the brightness to set the light to
pub fn with_hue(self, h: u16) -> Self
[src]
Sets the hue to set the light to
pub fn with_sat(self, s: u8) -> Self
[src]
Sets the saturation to set the light to
pub fn with_xy(self, xy: (f32, f32)) -> Self
[src]
Sets the xy colour coordinates to set the light to
pub fn with_ct(self, c: u16) -> Self
[src]
Sets the temperature to set the light to
pub fn with_alert(self, a: String) -> Self
[src]
Sets the alert mode to set the light to
pub fn with_effect(self, a: String) -> Self
[src]
Sets the effect mode to set the light to
pub fn with_transitiontime(self, t: u16) -> Self
[src]
Sets the transition time in decaseconds
pub fn with_bri_inc(self, b: i16) -> Self
[src]
Sets the brightness increment value
pub fn with_hue_inc(self, h: i16) -> Self
[src]
Sets the hue increment value
pub fn with_sat_inc(self, s: i16) -> Self
[src]
Sets the saturation increment value
pub fn with_ct_inc(self, ct: i16) -> Self
[src]
Sets the saturation increment value
pub fn with_xy_inc(self, xy: (i16, i16)) -> Self
[src]
Sets the x and y increment value
Trait Implementations
impl Default for LightCommand
[src]
fn default() -> LightCommand
[src]
impl Clone for LightCommand
[src]
fn clone(&self) -> LightCommand
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for LightCommand
[src]
impl Serialize for LightCommand
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for LightCommand
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for LightCommand
impl Sync for LightCommand
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Typeable for T where
T: Any,
T: Any,