Added print for debug

master
Ebbe Baß 2022-01-04 02:46:23 +01:00
parent 3eaaae52e6
commit b6165fadfc
1 changed files with 6 additions and 3 deletions

View File

@ -66,11 +66,12 @@ def change_idle_mode(channel):
idle_mode += 1
if idle_mode == 6:
idle_mode = 1
print('Change Idlemode executed')
def power_toggle(channel):
print('button pressed')
global power_button_pressed
power_button_pressed = 'True'
print('Toggle Power executed')
#Web API
app = Flask(__name__)
@ -79,9 +80,11 @@ app = Flask(__name__)
def index():
command = str(request.args.get('command'))
if command == "switch-ilde-mode":
change_idle_mode
print('Switched Idlemode via API')
change_idle_mode()
elif command == "switch-toggle-on-off":
power_toggle
print('Toggled Power via API')
power_toggle()
return command