temp test without off mode for channel 1

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-14 01:37:38 +02:00
parent e11994bde1
commit b3233df55c
1 changed files with 3 additions and 7 deletions

10
main.py
View File

@ -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")