From ab48acbfd9bed1b408031a7cded2facf2e72e4d7 Mon Sep 17 00:00:00 2001 From: derlole <122916573+derlole@users.noreply.github.com> Date: Wed, 28 May 2025 08:33:50 +0000 Subject: [PATCH] micropython main.py syntax --- micropython/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/micropython/main.py b/micropython/main.py index 673856c..a6a0d5e 100644 --- a/micropython/main.py +++ b/micropython/main.py @@ -57,7 +57,7 @@ def mqtt_callback(topic, msg): if command['command']=='make_coffee': kaffee_machen=1 - if kaffee_fertig==1: + if kaffee_fertig==1: print(command) client.publish(MQTT_TOPIC_RETURN, json.dumps(command)) @@ -112,8 +112,8 @@ while True: "starten": starten.value(), # ---komunikation--- - "kaffee_machen": kaffee_machen, - "vorbereitung": vorbereitung, + "kaffee_machen": make_coffee, + #"vorbereitung": vorbereitung, "kaffee_fertig": kaffee_fertig, } @@ -139,7 +139,7 @@ while True: gestartet = 1 #Starten der Kaffeemaschine per remote - if make_coffee() == 1 and an() == 1 and bereit() == 1 and fehler() == 0 and gestartet == 1: + if make_coffee() == 1 and an() == 1 and bereit() == 1 and fehler() == 0 and gestartet == 1: starten=1 time.sleep(1) starten=0