Trait tplinker::capabilities::Light [−][src]
pub trait Light: DeviceActions {
fn get_light_state(&self) -> Result<LightState> { ... }
fn set_light_state(&self, light_state: SetLightState) -> Result<LightState> { ... }
}
Expand description
Smart light devices
The LB class of devices support this trait.
Provided methods
fn get_light_state(&self) -> Result<LightState>
fn get_light_state(&self) -> Result<LightState>
Get the current state of the light
fn set_light_state(&self, light_state: SetLightState) -> Result<LightState>
fn set_light_state(&self, light_state: SetLightState) -> Result<LightState>
Set the state of the light
This is a low level method, and has no validation. You should use one of the
higher level methods such as set_brightness
or set_color_temp
or set_hsv
.