From 7f64d6e218c86b9987aaa33da42d35887b264942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 9 Nov 2021 18:58:49 +0100 Subject: [PATCH] Update main.py --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 95cebe8..38fc7cf 100644 --- a/main.py +++ b/main.py @@ -73,6 +73,7 @@ def led_power_toggle(channel): else: led_power = True print('Led toggled: '+str(led_power)) + return led_power def read_idle(): with open('./idle.txt', 'r') as f: @@ -100,7 +101,6 @@ if __name__ == '__main__': try: while True: - try: with open('./idle.txt', 'r') as f: idle_mode = f.readline() @@ -110,7 +110,7 @@ if __name__ == '__main__': with open('./idle.txt', 'r') as f: idle_mode = f.readline() - if led_power == False: + if led_power_toggle == False: setColor(strip, Color(0,0,0)) else: if check_internet() == False: