From baf4d021917936eb5a19f694fd85e19b528eb710 Mon Sep 17 00:00:00 2001 From: Denis Denisov Date: Sun, 14 Dec 2025 16:19:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=BB=D0=B5=D0=B9=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8C=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=20=D0=BD=D0=B5=20=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=20=D0=BA=D0=B0=D0=BA=20=D1=8F=20=D0=B4=D1=83=D0=BC?= =?UTF-8?q?=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- heat_control.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/heat_control.py b/heat_control.py index 0d32274..918e97e 100644 --- a/heat_control.py +++ b/heat_control.py @@ -116,8 +116,7 @@ def check_temperatures(): # turn on the pump # and turn off the boiler of course for c in contours: - # valves are normally-opened, so 0 means "open" - mqtt_client.publish(c.out_topic, "0", retain=True) + mqtt_client.publish(c.out_topic, "1", retain=True) mqtt_client.publish(boiler_control, "0", retain=True) mqtt_client.publish(pump_control, "1", retain=True) return @@ -133,8 +132,7 @@ def check_temperatures(): if count_t == 0: logger.error("No temperatures available, switch to full-on mode") for c in contours: - # valves are normally-opened, so 0 means "open" - mqtt_client.publish(c.out_topic, "0", retain=True) + mqtt_client.publish(c.out_topic, "1", retain=True) # turn on boiler mqtt_client.publish(boiler_control, "1", retain=True) return @@ -155,10 +153,10 @@ def check_temperatures(): # should turn off contour c.check_state(False) if c.state: - # 0 means "open" - mqtt_client.publish(c.out_topic, "0", retain=True) - else: + # 0 means "closed" mqtt_client.publish(c.out_topic, "1", retain=True) + else: + mqtt_client.publish(c.out_topic, "0", retain=True) if any_opened: any_opened = False