From 3fa620db10552302ea7e11da7cb3b4b80b30a3a8 Mon Sep 17 00:00:00 2001 From: helgibbons <50950368+helgibbons@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:52:48 +0100 Subject: [PATCH] Fix error in automation.py --- micropython/modules_py/automation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/modules_py/automation.py b/micropython/modules_py/automation.py index 028122f6..36552e3d 100644 --- a/micropython/modules_py/automation.py +++ b/micropython/modules_py/automation.py @@ -306,7 +306,7 @@ class Automation2040WMini(): self.__conn_led_pwm.duty_u16(65535) elif brightness is False: self.__conn_led_pwm.duty_u16(0) - elif brightness > 0.0 or brightness > 100.0: + elif brightness < 0.0 or brightness > 100.0: raise ValueError("brightness out of range. Expected 0 to 100, or True or False") else: gamma = 2.8