From b3233df55c5cbaee183b5e5e3dda4ec7eb7cfdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Thu, 14 Jul 2022 01:37:38 +0200 Subject: [PATCH] temp test without off mode for channel 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 20426fa..38c7fa2 100644 --- a/main.py +++ b/main.py @@ -91,13 +91,9 @@ def mqtt_on_message(client, userdata, msg): if topic == "strawberry-pi-greenhouse/relay/channel/1": if payload == "on": - # relay_controller(channel_1, "True") - relay = gpiozero.OutputDevice(4, active_high=True, initial_value=False) - relay.on() - elif payload == "off": - # relay_controller(channel_1, "False") - relay = gpiozero.OutputDevice(4, active_high=True, initial_value=False) - relay.on() + relay_controller(channel_1, "True") + # elif payload == "off": + # relay_controller(channel_1, "False") elif topic == "strawberry-pi-greenhouse/relay/channel/2": if payload == "on": relay_controller(channel_2, "True")