v0.7.7
This commit is contained in:
+28
-1
@@ -244,6 +244,29 @@ impl DeviceCommand {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ManualDeviceBaseline {
|
||||
pub power: bool,
|
||||
pub mode: String,
|
||||
pub target_temperature: f64,
|
||||
pub fan_speed: u8,
|
||||
pub quiet: bool,
|
||||
pub sleep: bool,
|
||||
}
|
||||
|
||||
impl From<&Device> for ManualDeviceBaseline {
|
||||
fn from(device: &Device) -> Self {
|
||||
Self {
|
||||
power: device.power,
|
||||
mode: device.mode.clone(),
|
||||
target_temperature: device.target_temperature,
|
||||
fan_speed: device.fan_speed,
|
||||
quiet: device.quiet,
|
||||
sleep: device.sleep,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Zone {
|
||||
pub id: String,
|
||||
@@ -330,9 +353,13 @@ pub struct Zone {
|
||||
pub device_manual_override_since: Option<DateTime<Utc>>,
|
||||
#[serde(default)]
|
||||
pub device_manual_override_until: Option<DateTime<Utc>>,
|
||||
/// Climate-relevant fields that caused the most recent external/manual takeover.
|
||||
/// Climate-relevant fields changed during the current external/manual takeover.
|
||||
#[serde(default)]
|
||||
pub device_manual_override_fields: Vec<String>,
|
||||
/// Controller-observed climate state immediately before the takeover started.
|
||||
/// It lets us drop a stale "resume automation" prompt when the user restores that state.
|
||||
#[serde(default)]
|
||||
pub device_manual_override_baseline: Option<ManualDeviceBaseline>,
|
||||
#[serde(default)]
|
||||
pub effective_mode: String,
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user