Introduce thermal zones as config subentries
Each temperature sensor used to be its own "room", so a room with two sensors counted twice and comfort importance was tied to sensors. zones.py adds Zone: a name, one or more sensors with sensor weights, a comfort weight, an optional target offset and adjacent zones (made symmetric). Sensor weights only combine readings; comfort weights only steer the MPC; neither touches the learned thermal coefficients. Zones are config subentries (HA's native "Add zone" / edit / delete on the integration page), with validation that a sensor belongs to one zone and is not an outdoor source, and a sensor-weight step for multi-sensor zones. Initial setup still asks for room sensors and weights and creates one zone per sensor. Configure no longer asks for rooms or weights. Config entry version 3. Migrating from 2 turns each room sensor into a one-sensor zone with its comfort weight and the sensor's entity ID as the zone key, so learned models, forecast entities (now linked to their zone, so deleting a zone removes them) and accuracy statistics carry over. Older versions cannot load a version 3 entry; rolling back needs the HA backup. A zone learns only across polls that used the same sensors (a sensor dropping out shifts the mean by its offset); the new poll outcome "sensors_changed" reports this. Status renames: input_quality.zones (per-sensor detail nested), excluded_zones, retired_zone_models; adds zone_names. Invalid stored comfort weights now fall back to 1.0, so the invalid_weights status is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
220ac570d2
commit
46587af8a3
15 files changed
+867
-155
No files matched your search
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"weights": {
|
||||
"title": "Room priorities",
|
||||
"description": "Each room has a relative comfort weight between 0.1 and 10; sensor entity is shown by each field."
|
||||
"description": "Each selected sensor becomes its own zone with this comfort weight. Later, group the sensors of one room into one zone with Add zone or by editing a zone."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
@@ -59,7 +59,6 @@
|
||||
"data": {
|
||||
"climate_entity": "Existing Generic Thermostat",
|
||||
"heater_entity": "Physical heating switch (read-only)",
|
||||
"room_entities": "Individual room temperature sensors",
|
||||
"horizon_minutes": "Prediction horizon (minutes)",
|
||||
"minimum_on_minutes": "Minimum ON time (minutes)",
|
||||
"minimum_off_minutes": "Minimum OFF time (minutes)",
|
||||
@@ -94,14 +93,9 @@
|
||||
"outside_rain_sources": "Rain sources (optional)",
|
||||
"outside_snow_sources": "Snow sources (optional)"
|
||||
}
|
||||
},
|
||||
"weights": {
|
||||
"title": "Room priorities",
|
||||
"description": "Weights determine relative comfort importance, not physics coefficients."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"invalid_rooms": "Select 1–12 distinct room sensors.",
|
||||
"invalid_weather": "Select at least one outdoor temperature sensor, distinct from room sensors."
|
||||
}
|
||||
},
|
||||
@@ -111,6 +105,7 @@
|
||||
"state": {
|
||||
"waiting_for_inputs": "Waiting for inputs",
|
||||
"first_sample": "First sample",
|
||||
"sensors_changed": "Zone sensors changed",
|
||||
"learned": "Learned",
|
||||
"partly_rejected": "Partly rejected (outlier)",
|
||||
"interval_out_of_range": "Irregular interval",
|
||||
@@ -120,5 +115,62 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"config_subentries": {
|
||||
"zone": {
|
||||
"entry_type": "Zone",
|
||||
"initiate_flow": {
|
||||
"user": "Add zone",
|
||||
"reconfigure": "Edit zone"
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Thermal zone",
|
||||
"description": "A room or area of the apartment. Sensor weights combine several sensors in one room; the comfort weight says how much the zone matters to the MPC. Neither changes the zone's learned thermal properties.",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"sensors": "Temperature sensors",
|
||||
"comfort_weight": "Comfort weight",
|
||||
"target_offset": "Target offset (°C)",
|
||||
"neighbors": "Adjacent zones (heat exchange)"
|
||||
},
|
||||
"data_description": {
|
||||
"comfort_weight": "Relative importance for the MPC (0.1–10).",
|
||||
"target_offset": "Added to the thermostat's target temperature for this zone.",
|
||||
"neighbors": "Zones this one exchanges heat with, for example through a wall or an open door. The coefficient is learned only when the data supports it."
|
||||
}
|
||||
},
|
||||
"sensor_weights": {
|
||||
"title": "Sensor weights",
|
||||
"description": "How much each sensor counts in the zone temperature (0.1–10)."
|
||||
},
|
||||
"reconfigure": {
|
||||
"title": "Thermal zone",
|
||||
"description": "A room or area of the apartment. Sensor weights combine several sensors in one room; the comfort weight says how much the zone matters to the MPC. Neither changes the zone's learned thermal properties.",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"sensors": "Temperature sensors",
|
||||
"comfort_weight": "Comfort weight",
|
||||
"target_offset": "Target offset (°C)",
|
||||
"neighbors": "Adjacent zones (heat exchange)"
|
||||
},
|
||||
"data_description": {
|
||||
"comfort_weight": "Relative importance for the MPC (0.1–10).",
|
||||
"target_offset": "Added to the thermostat's target temperature for this zone.",
|
||||
"neighbors": "Zones this one exchanges heat with, for example through a wall or an open door. The coefficient is learned only when the data supports it."
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"zone_name_required": "Enter a name.",
|
||||
"zone_sensors": "Choose 1–6 different sensors.",
|
||||
"sensor_in_other_zone": "A chosen sensor already belongs to another zone.",
|
||||
"sensor_is_weather_source": "A chosen sensor is used as an outdoor temperature source.",
|
||||
"too_many_zones": "At most 12 zones are supported."
|
||||
},
|
||||
"abort": {
|
||||
"reconfigure_successful": "The zone was updated."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"weights": {
|
||||
"title": "Ponderile camerelor",
|
||||
"description": "Fiecare cameră are o pondere de confort între 0,1 și 10; senzorul este indicat în numele câmpului."
|
||||
"description": "Fiecare senzor ales devine o zonă proprie, cu această pondere de confort. Ulterior poți grupa senzorii unei camere într-o singură zonă cu Adaugă zonă sau modificând o zonă."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
@@ -59,7 +59,6 @@
|
||||
"data": {
|
||||
"climate_entity": "Termostatul Generic Thermostat existent",
|
||||
"heater_entity": "Releul fizic (numai citire)",
|
||||
"room_entities": "Senzorii individuali din camere",
|
||||
"horizon_minutes": "Orizontul predicției (minute)",
|
||||
"minimum_on_minutes": "Durată minimă ON (minute)",
|
||||
"minimum_off_minutes": "Durată minimă OFF (minute)",
|
||||
@@ -94,14 +93,9 @@
|
||||
"outside_rain_sources": "Senzori precipitații ploaie (opțional)",
|
||||
"outside_snow_sources": "Senzori precipitații ninsoare (opțional)"
|
||||
}
|
||||
},
|
||||
"weights": {
|
||||
"title": "Ponderi pentru camere",
|
||||
"description": "Ponderile afectează importanța confortului, nu coeficienții fizici."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"invalid_rooms": "Selectează 1–12 senzori diferiți.",
|
||||
"invalid_weather": "Alege cel puțin un senzor de temperatură exterioară, diferit de senzorii camerelor."
|
||||
}
|
||||
},
|
||||
@@ -111,6 +105,7 @@
|
||||
"state": {
|
||||
"waiting_for_inputs": "Așteaptă datele de intrare",
|
||||
"first_sample": "Prima măsurătoare",
|
||||
"sensors_changed": "Senzorii zonei s-au schimbat",
|
||||
"learned": "Învățat",
|
||||
"partly_rejected": "Respins parțial (valoare aberantă)",
|
||||
"interval_out_of_range": "Interval neregulat",
|
||||
@@ -120,5 +115,62 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"config_subentries": {
|
||||
"zone": {
|
||||
"entry_type": "Zonă",
|
||||
"initiate_flow": {
|
||||
"user": "Adaugă zonă",
|
||||
"reconfigure": "Modifică zona"
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Zonă termică",
|
||||
"description": "O cameră sau o zonă a apartamentului. Ponderile senzorilor combină mai mulți senzori din aceeași cameră; ponderea de confort spune cât de importantă este zona pentru MPC. Niciuna nu modifică proprietățile termice învățate ale zonei.",
|
||||
"data": {
|
||||
"name": "Nume",
|
||||
"sensors": "Senzori de temperatură",
|
||||
"comfort_weight": "Pondere de confort",
|
||||
"target_offset": "Abatere de la țintă (°C)",
|
||||
"neighbors": "Zone învecinate (schimb de căldură)"
|
||||
},
|
||||
"data_description": {
|
||||
"comfort_weight": "Importanța relativă pentru MPC (0,1–10).",
|
||||
"target_offset": "Se adaugă la temperatura țintă a termostatului pentru această zonă.",
|
||||
"neighbors": "Zonele cu care această zonă face schimb de căldură, de exemplu printr-un perete sau o ușă deschisă. Coeficientul este învățat doar dacă datele îl susțin."
|
||||
}
|
||||
},
|
||||
"sensor_weights": {
|
||||
"title": "Ponderile senzorilor",
|
||||
"description": "Cât contează fiecare senzor în temperatura zonei (0,1–10)."
|
||||
},
|
||||
"reconfigure": {
|
||||
"title": "Zonă termică",
|
||||
"description": "O cameră sau o zonă a apartamentului. Ponderile senzorilor combină mai mulți senzori din aceeași cameră; ponderea de confort spune cât de importantă este zona pentru MPC. Niciuna nu modifică proprietățile termice învățate ale zonei.",
|
||||
"data": {
|
||||
"name": "Nume",
|
||||
"sensors": "Senzori de temperatură",
|
||||
"comfort_weight": "Pondere de confort",
|
||||
"target_offset": "Abatere de la țintă (°C)",
|
||||
"neighbors": "Zone învecinate (schimb de căldură)"
|
||||
},
|
||||
"data_description": {
|
||||
"comfort_weight": "Importanța relativă pentru MPC (0,1–10).",
|
||||
"target_offset": "Se adaugă la temperatura țintă a termostatului pentru această zonă.",
|
||||
"neighbors": "Zonele cu care această zonă face schimb de căldură, de exemplu printr-un perete sau o ușă deschisă. Coeficientul este învățat doar dacă datele îl susțin."
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"zone_name_required": "Introdu un nume.",
|
||||
"zone_sensors": "Alege între 1 și 6 senzori diferiți.",
|
||||
"sensor_in_other_zone": "Un senzor ales aparține deja altei zone.",
|
||||
"sensor_is_weather_source": "Un senzor ales este folosit ca sursă de temperatură exterioară.",
|
||||
"too_many_zones": "Sunt permise cel mult 12 zone."
|
||||
},
|
||||
"abort": {
|
||||
"reconfigure_successful": "Zona a fost actualizată."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user