This commit is contained in:
Mateusz Gruszczyński committed 2026-09-03 13:08:28 +02:00
1 parent d7b6d0478f
commit b8ff31f205
52 files changed
+3874 -1912

No files matched your search

-4
View File
@@ -9,10 +9,6 @@ pub struct RuntimeSettings {
/// Global seasonal mode. Zones follow this by default. Values: cool/heat/off; off pauses house-level thermostat control.
#[serde(default = "default_house_mode")]
pub house_mode: String,
/// Legacy compatibility flag. Since v0.9.4 global ON/OFF is a bulk thermostat action, not an
/// automation gate. The controller normalizes this field to true on load/import.
#[serde(default = "default_true")]
pub house_power_enabled: bool,
/// `setpoint` keeps units powered and modulates compressor demand by changing target temperature.
#[serde(default = "default_control_strategy")]
pub control_strategy: String,
+113
View File
@@ -0,0 +1,113 @@
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ApplicationSettings {
pub simulator_enabled: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct GreeSettings {
pub controller_id: String,
pub poll_interval_seconds: u64,
pub zone_interval_seconds: u64,
pub discovery_timeout_ms: u64,
pub discovery_broadcast: String,
pub suppress_device_beep: bool,
pub compressor_protection_enabled: bool,
pub compressor_protection_seconds: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HistorySettings {
pub retention_days: u32,
pub compaction_enabled: bool,
pub event_retention_days: u32,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InfluxDbSettingsUpdate {
pub enabled: bool,
pub version: String,
pub url: String,
pub database: String,
pub username: String,
#[serde(default)]
pub password: Option<String>,
pub org: String,
pub bucket: String,
#[serde(default)]
pub token: Option<String>,
pub history_threshold_days: u32,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InfluxDbSettingsView {
pub enabled: bool,
pub version: String,
pub url: String,
pub database: String,
pub username: String,
pub password_configured: bool,
pub org: String,
pub bucket: String,
pub token_configured: bool,
pub history_threshold_days: u32,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NotificationSettingsUpdate {
pub enabled: bool,
pub mode: String,
pub provider: String,
#[serde(default)]
pub pushover_app_token: Option<String>,
#[serde(default)]
pub pushover_user_key: Option<String>,
#[serde(default)]
pub slack_webhook_url: Option<String>,
#[serde(default)]
pub discord_webhook_url: Option<String>,
pub cooldown_seconds: u64,
pub communication_failure_threshold: u32,
pub target_timeout_minutes: u32,
pub alert_types: NotificationAlertTypes,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NotificationSettingsView {
pub enabled: bool,
pub mode: String,
pub provider: String,
pub pushover_configured: bool,
pub slack_configured: bool,
pub discord_configured: bool,
pub cooldown_seconds: u64,
pub communication_failure_threshold: u32,
pub target_timeout_minutes: u32,
pub alert_types: NotificationAlertTypes,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HomeAssistantSettingsUpdate {
pub url: String,
#[serde(default)]
pub token: Option<String>,
pub default_entity_id: String,
pub outdoor_entity_id: String,
pub sensor_stale_after_seconds: u64,
pub allow_invalid_tls: bool,
pub sensor_aliases: BTreeMap<String, String>,
pub flow_inputs: Vec<FlowSharedInput>,
pub outdoor_assist_enabled: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HomeAssistantSettingsView {
pub url: String,
pub token_configured: bool,
pub default_entity_id: String,
pub outdoor_entity_id: String,
pub sensor_stale_after_seconds: u64,
pub allow_invalid_tls: bool,
pub sensor_aliases: BTreeMap<String, String>,
pub flow_inputs: Vec<FlowSharedInput>,
pub outdoor_assist_enabled: bool,
}