fix: fixed setting of pin value

This commit is contained in:
Elias Renman
2023-06-19 17:45:54 +02:00
parent 7db07104ec
commit f4c3ce6a01

View File

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