Reset neighbours' cross-ventilation when a window's polarity flips

A flipped contact sensor reverses what every term saw as open, including the
other zones' cross-ventilation term, whose fingerprint covered only the
window's sensor and opening factor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
buzeraandClaude Opus 5.5 committed 2026-10-27 03:53:39 +02:00
1 parent 4911b32c5e
commit 8eef04c385
2 files changed
+8 -2

No files matched your search

@@ -15,7 +15,7 @@ everything else is kept. What each fingerprint covers:
* ventilation terms: the measurement plus the zone's windows (sensor, polarity,
opening factor); "vent_wind_dir" also the windows' facing directions;
"recovery" also the recovery time constant; "vent_cross" also the other zones'
windows.
windows (sensor, polarity, opening factor).
Comfort weight, target offset and names are not physical and are never included.
"""
@@ -71,7 +71,7 @@ def zone_fingerprints(zones: Mapping[str, Any], sources: Iterable[Any], windows:
m = measured[key]
plain = zone_windows(key)
# Cross-ventilation scales with the other zones' openings.
others = sorted([w.sensor, w.opening] for w in windows if w.zone != key and w.enabled)
others = sorted([w.sensor, w.inverted, w.opening] for w in windows if w.zone != key and w.enabled)
prints = {"base": m, "loss": m, "heat": m, "bias": m,
"internal": _hash([m, sorted(source_signature(s, sources) for s in sources
if s.zone == key and s.enabled)]),