Leave out unusable rooms instead of pausing; add keep-last-value option
A single stale, unavailable, missing or invalid room sensor paused learning and forecasts for every room. That is not acceptable once the MPC may control heating. Now such a room is left out: the weighted temperature, learning and the optimizer use the remaining rooms with their weights re-normalized, and a room learns only across poll pairs where it was usable at both ends. Readiness considers only the rooms used. Everything pauses only when no room is usable or a shared input (relay, thermostat, outdoor temperature) is missing. A new setup/Configure checkbox, room_stale_use_last_value (default off), keeps using a stale room sensor's last value instead, for sensors that report only on change. It never applies to unavailable or invalid sensors, or to a sensor silent for more than 24 hours. Status adds excluded_rooms, weight_coverage and a per-room "used" flag. English and Romanian labels and help text added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cd8b65ac2f
commit
3076beebfb
10 files changed
+184
-34
No files matched your search
@@ -12,6 +12,9 @@ CONF_SWITCH_COST = "switching_cost"
|
||||
CONF_HEAT_COST = "heating_cost"
|
||||
CONF_ROOM_MAX_AGE = "room_max_age_minutes"
|
||||
CONF_WEATHER_MAX_AGE = "weather_max_age_minutes"
|
||||
# Stale room sensors: False leaves them out (re-weighting the other rooms),
|
||||
# True keeps using their last value for sensors that report only on change.
|
||||
CONF_ROOM_STALE_KEEP = "room_stale_use_last_value"
|
||||
CONF_BAND = "comfort_band"
|
||||
|
||||
# Each source list is ordered: first valid sensor wins; remaining are fallbacks.
|
||||
@@ -32,6 +35,7 @@ WEATHER_EXTRA = ("humidity", "feels_like", "pressure", "visibility", "rain", "sn
|
||||
DEFAULTS = {
|
||||
CONF_ROOM_MAX_AGE: 30,
|
||||
CONF_WEATHER_MAX_AGE: 120,
|
||||
CONF_ROOM_STALE_KEEP: False,
|
||||
CONF_HORIZON: 120,
|
||||
CONF_MIN_ON: 15,
|
||||
CONF_MIN_OFF: 10,
|
||||
@@ -39,5 +43,7 @@ DEFAULTS = {
|
||||
CONF_HEAT_COST: 0.025,
|
||||
CONF_BAND: 0.15,
|
||||
}
|
||||
# A room sensor silent this long is treated as dead even when keeping last values.
|
||||
ROOM_STALE_KEEP_MAX_MINUTES = 24 * 60
|
||||
SAMPLE_MINUTES = 5
|
||||
BLOCK_MINUTES = 15
|
||||
Reference in new issue
Block a user