mirror of
https://github.com/eliasrenman/gardentron.git
synced 2026-03-16 20:46:07 +01:00
fix: fixed setting of pin value
This commit is contained in:
@@ -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))}
|
||||
|
||||
Reference in New Issue
Block a user