diff --git a/main.py b/main.py index 9315f28..a78f62f 100644 --- a/main.py +++ b/main.py @@ -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