From a0bf64296777ea88db3e8e4c3bde989827cb42cd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 09:08:15 +0000 Subject: [PATCH] fix(addon): fail-low daily-volume fallback so orphaned zones can't free-run to 300 L MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zones the engine detects from their VWC sensor but that the integration never built a max_daily_volume entity for (num_zones < detected zones) fell through to a hardcoded 300 L fallback — above the integration's own 200 L UI maximum — so orphaned rows watered up to 300 L/day while wired rows honoured their real cap. Lower the fallback to 150 L so a missing cap entity can never grant more daily water than the UI can express. Co-Authored-By: Claude --- addons/f2_control/f2_control/controller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/f2_control/f2_control/controller.py b/addons/f2_control/f2_control/controller.py index 02d18e4..decc298 100644 --- a/addons/f2_control/f2_control/controller.py +++ b/addons/f2_control/f2_control/controller.py @@ -651,7 +651,12 @@ def _params(self, room, zone): ec_target_p2=self._zone_num(room, zone, f"ec_target_{sfx}_p2", 6), p3_emergency_floor=efloor, p3_emergency_shot=self._zone_num(room, zone, "p3_emergency_shot_size", 2), - max_daily_volume=self._zone_num(room, zone, "max_daily_volume", 300), + # Fallback used ONLY when a zone has no readable max_daily_volume entity — e.g. a zone the + # engine detected from its VWC sensor but the integration never built a cap entity for + # (num_zones < detected zones). Must fail LOW: the integration's own entity maxes at 200 L, + # so the engine can never grant more daily water than the UI can express. Was 300 (above the + # UI max) which let orphaned zones free-run to 300 L/day while wired zones honoured their cap. + max_daily_volume=self._zone_num(room, zone, "max_daily_volume", 150), field_capacity=fc, max_ec=self._zone_num(room, zone, "maximum_ec", 9), stacking_on=self._on(