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): ...@@ -45,6 +45,9 @@ def action(change_pin, action):
GPIO.output(change_pin, not GPIO.input(change_pin)) GPIO.output(change_pin, not GPIO.input(change_pin))
message = "Toggled " + device_name + "." message = "Toggled " + device_name + "."
for pin in pins:
pins[pin]['state'] = GPIO.input(pin)
template_data = { template_data = {
'message': message, 'message': message,
'pins': pins '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