From 463c2415d268926f14a1abdbcc4930e1542ff247 Mon Sep 17 00:00:00 2001 From: jens Date: Tue, 1 Dec 2020 19:59:55 +0100 Subject: [PATCH] - send TempCtrl:Soll if changed --- brewpi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/brewpi.py b/brewpi.py index 5bd9806..0f9086a 100644 --- a/brewpi.py +++ b/brewpi.py @@ -150,9 +150,12 @@ class TcTask(ATask): async def on_process(self): print("{}: Started with interval {} s".format(self.msg_handler.get_key(), self.interval)) + temp_soll = Value() while True: - self.tc.set_theta_soll(self.temp_soll) - await self.send({'Soll': self.temp_soll}) + temp_soll.set(self.temp_soll) + if temp_soll.is_changed(): + self.tc.set_theta_soll(temp_soll.get()) + await self.send({'Soll': temp_soll.get()}) self.tc.process() await asyncio.sleep(self.interval)