on/off buttons geändert

This commit is contained in:
Bernd Reuther 2021-10-17 13:17:50 +02:00
parent bfdf8e9393
commit 6e5e394797

View File

@ -67,12 +67,12 @@ def action(changePin, action):
if action == "on":
# Set the pin high:
#GPIO.output(changePin, GPIO.HIGH)
pi.write(changePin, 1)
pi.write(changePin, 0)
# Save the status message to be passed into the template:
message = "Turned " + deviceName + " on."
if action == "off":
#GPIO.output(changePin, GPIO.LOW)
pi.write(changePin, GPIO.LOW)
pi.write(changePin, 1)
message = "Turned " + deviceName + " off."
# For each pin, read the pin state and store it in the pins dictionary: