Commit 97fb240e authored by Kristian Tan's avatar Kristian Tan

Change pin states in template

parent 8a53baae
......@@ -45,6 +45,9 @@ def action(change_pin, action):
GPIO.output(change_pin, not GPIO.input(change_pin))
message = "Toggled " + device_name + "."
for pin in pins:
pins[pin]['state'] = GPIO.input(pin)
template_data = {
'message': message,
'pins': pins
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment