parent
b3233df55c
commit
5dfd078e96
4
main.py
4
main.py
|
@ -92,8 +92,8 @@ def mqtt_on_message(client, userdata, msg):
|
||||||
if topic == "strawberry-pi-greenhouse/relay/channel/1":
|
if topic == "strawberry-pi-greenhouse/relay/channel/1":
|
||||||
if payload == "on":
|
if payload == "on":
|
||||||
relay_controller(channel_1, "True")
|
relay_controller(channel_1, "True")
|
||||||
# elif payload == "off":
|
elif payload == "off":
|
||||||
# relay_controller(channel_1, "False")
|
relay_controller(channel_1, "False")
|
||||||
elif topic == "strawberry-pi-greenhouse/relay/channel/2":
|
elif topic == "strawberry-pi-greenhouse/relay/channel/2":
|
||||||
if payload == "on":
|
if payload == "on":
|
||||||
relay_controller(channel_2, "True")
|
relay_controller(channel_2, "True")
|
||||||
|
|
Loading…
Reference in New Issue