From 288e3718657048eb2d0d8c28cdb968dbba82e3d7 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sat, 8 Jun 2024 11:17:21 +0200 Subject: [PATCH] Fix bug. --- relay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relay.py b/relay.py index f04828e..8612994 100755 --- a/relay.py +++ b/relay.py @@ -70,7 +70,8 @@ def init_serial(pPort): init_serial(device) if action != 'status': for relay in relays: - ser.write(relay.encode('ascii')+action+'\r\n') + command = relay+action+'\r\n' + ser.write(command.encode('ascii')) bytes = ser.readline() #print ('Renvoie :\r\n' + bytes)