This commit is contained in:
Mateusz Gruszczyński
2026-08-24 00:23:47 +02:00
parent 6e3075fae5
commit 10bc9aa099
21 changed files with 1110 additions and 260 deletions
+18 -1
View File
@@ -71,6 +71,9 @@ pub struct Device {
pub current_temperature: Option<f64>,
#[serde(default)]
pub outdoor_temperature: Option<f64>,
/// Some GREE firmware reports TemSen/OutEnvTem with a +40 C wire offset.
#[serde(default)]
pub temperature_sensor_offset: Option<bool>,
#[serde(default)]
pub online: bool,
#[serde(default)]
@@ -110,6 +113,7 @@ impl Device {
light: true,
current_temperature: Some(26.0),
outdoor_temperature: Some(30.0),
temperature_sensor_offset: Some(false),
online: true,
last_seen: Some(now),
last_error: None,
@@ -228,9 +232,12 @@ pub struct Zone {
/// Effective profile currently used by the zone: comfort/sleep/away/custom.
#[serde(default = "default_active_preset")]
pub active_preset: String,
/// Optional user override. Cleared automatically at the next schedule boundary.
/// Optional user preset override. Cleared automatically at the next schedule boundary.
#[serde(default)]
pub manual_preset: Option<String>,
/// Optional quick-thermostat setpoint override. It does not change the active preset.
#[serde(default)]
pub manual_setpoint: Option<f64>,
#[serde(default)]
pub manual_override_until: Option<DateTime<Utc>>,
#[serde(default)]
@@ -343,6 +350,16 @@ pub struct ZoneReading {
pub active_preset: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HaReading {
pub id: i64,
pub entity_id: String,
pub zone_id: Option<String>,
pub kind: String,
pub timestamp: DateTime<Utc>,
pub temperature: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EventLog {
pub id: i64,