Deserialize all properties of the light resource
This commit is contained in:
parent
f0e773a37e
commit
903582291c
1 changed files with 22 additions and 20 deletions
|
@ -2,26 +2,27 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct Light {
|
pub struct Light {
|
||||||
// #[serde(rename = "alert")]
|
#[serde(rename = "alert")]
|
||||||
// pub alert: Alert,
|
pub alert: Alert,
|
||||||
|
|
||||||
// #[serde(rename = "color")]
|
#[serde(rename = "color")]
|
||||||
// pub color: Option<Color>,
|
pub color: Option<Color>,
|
||||||
|
|
||||||
// #[serde(rename = "color_temperature")]
|
#[serde(rename = "color_temperature")]
|
||||||
// pub color_temperature: ColorTemperature,
|
pub color_temperature: ColorTemperature,
|
||||||
|
|
||||||
// #[serde(rename = "color_temperature_delta")]
|
#[serde(rename = "color_temperature_delta")]
|
||||||
// pub color_temperature_delta: Delta,
|
pub color_temperature_delta: Delta,
|
||||||
|
|
||||||
// #[serde(rename = "dimming")]
|
#[serde(rename = "dimming")]
|
||||||
// pub dimming: Dimming,
|
pub dimming: Dimming,
|
||||||
|
|
||||||
// #[serde(rename = "dimming_delta")]
|
#[serde(rename = "dimming_delta")]
|
||||||
// pub dimming_delta: Delta,
|
pub dimming_delta: Delta,
|
||||||
|
|
||||||
|
#[serde(rename = "dynamics")]
|
||||||
|
pub dynamics: Dynamics,
|
||||||
|
|
||||||
// #[serde(rename = "dynamics")]
|
|
||||||
// pub dynamics: Dynamics,
|
|
||||||
#[serde(rename = "id")]
|
#[serde(rename = "id")]
|
||||||
pub id: String,
|
pub id: String,
|
||||||
|
|
||||||
|
@ -39,11 +40,12 @@ pub struct Light {
|
||||||
|
|
||||||
#[serde(rename = "owner")]
|
#[serde(rename = "owner")]
|
||||||
pub owner: Owner,
|
pub owner: Owner,
|
||||||
// #[serde(rename = "type")]
|
|
||||||
// pub datum_type: String,
|
#[serde(rename = "type")]
|
||||||
//
|
pub datum_type: String,
|
||||||
// #[serde(rename = "effects")]
|
|
||||||
// pub effects: Option<Effects>,
|
#[serde(rename = "effects")]
|
||||||
|
pub effects: Option<Effects>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
|
@ -121,7 +123,7 @@ pub struct Dimming {
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct Dynamics {
|
pub struct Dynamics {
|
||||||
#[serde(rename = "speed")]
|
#[serde(rename = "speed")]
|
||||||
pub speed: i64,
|
pub speed: f64,
|
||||||
|
|
||||||
#[serde(rename = "speed_valid")]
|
#[serde(rename = "speed_valid")]
|
||||||
pub speed_valid: bool,
|
pub speed_valid: bool,
|
||||||
|
|
Loading…
Reference in a new issue