From b6165fadfca29d77f3a82cedc225674dd16562a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 4 Jan 2022 02:46:23 +0100 Subject: [PATCH] Added print for debug --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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