v0.8.4
This commit is contained in:
@@ -38,6 +38,7 @@ fn default_night_end() -> String { "06:00".into() }
|
||||
fn default_night_max_fan_speed() -> u8 { 1 }
|
||||
fn default_group_power_enabled() -> bool { true }
|
||||
fn default_temporary_tolerance() -> f64 { 0.3 }
|
||||
fn default_temporary_start_kind() -> String { "now".into() }
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Device {
|
||||
@@ -271,9 +272,18 @@ impl From<&Device> for ManualDeviceBaseline {
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TemporaryQuickThermostat {
|
||||
/// now | delay | at. `started_at` is the effective start instant and may be in the future.
|
||||
#[serde(default = "default_temporary_start_kind")]
|
||||
pub start_kind: String,
|
||||
/// duration | until | temperature_reached | temperature_stable | schedule_boundary
|
||||
pub finish_kind: String,
|
||||
/// Effective start instant. Future values mean the temporary thermostat is scheduled
|
||||
/// but does not yet own the zone or block normal schedules/automations.
|
||||
pub started_at: DateTime<Utc>,
|
||||
/// Set when the controller actually activates ownership. Kept separate from started_at
|
||||
/// so a delayed session can survive restarts without being mistaken for an active one.
|
||||
#[serde(default)]
|
||||
pub activated_at: Option<DateTime<Utc>>,
|
||||
/// Zone automation enabled-state from before the temporary session. A temporary
|
||||
/// Quick Thermostat may run even when normal automation was disabled, then restore it.
|
||||
#[serde(default)]
|
||||
@@ -302,6 +312,12 @@ pub struct TemporaryQuickThermostat {
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TemporaryQuickThermostatRequest {
|
||||
#[serde(default = "default_temporary_start_kind")]
|
||||
pub start_kind: String,
|
||||
#[serde(default)]
|
||||
pub start_delay_minutes: Option<u64>,
|
||||
#[serde(default)]
|
||||
pub start_at: Option<DateTime<Utc>>,
|
||||
pub finish_kind: String,
|
||||
#[serde(default)]
|
||||
pub duration_minutes: Option<u64>,
|
||||
|
||||
Reference in New Issue
Block a user