From f4c3ce6a01aea9387a3bc178ae4048839c9f19ce Mon Sep 17 00:00:00 2001 From: Elias Renman Date: Mon, 19 Jun 2023 17:45:54 +0200 Subject: [PATCH] fix: fixed setting of pin value --- pico-w/src/pin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pico-w/src/pin.py b/pico-w/src/pin.py index 9ef4b79..df03079 100644 --- a/pico-w/src/pin.py +++ b/pico-w/src/pin.py @@ -74,6 +74,6 @@ def try_switch_relay(relay_index: int, value: bool): # Update the relay state relays[index][1] = state # Then set the pin - relays[index][0].value() + relays[index][0].value(value) return {"status": "success", "message": "Successfully turned on relay", "data": list(map(lambda x: x[1], relays))}