Struct huelib::resource::sensor::State [−][src]
pub struct State {
pub presence: Option<bool>,
pub flag: Option<bool>,
pub last_updated: Option<NaiveDateTime>,
pub button_event: Option<u32>,
pub temperature: Option<i32>,
pub light_level: Option<u32>,
pub dark: Option<bool>,
pub daylight: Option<bool>,
}
Expand description
Current state of a sensor.
Fields
presence: Option<bool>
Whether the sensor is present.
flag: Option<bool>
Flag of the sensor.
last_updated: Option<NaiveDateTime>
The current battery state in percent.
Button id that was pressed last.
temperature: Option<i32>
The temperature in centigrades.
light_level: Option<u32>
The light level in centiluxes.
dark: Option<bool>
Whether it’s dark according to the sensor’s sensitivity.
daylight: Option<bool>
Whether it’s daytime according to the sensor’s sensitivity.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for State
impl UnwindSafe for State
Blanket Implementations
Mutably borrows from an owned value. Read more