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: