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