From ca90f36f0786287be4dff3f4fb2859e294f6798c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 2 Jul 2022 00:50:36 +0200 Subject: [PATCH] other methode for exception color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 35ca627..896c431 100644 --- a/main.py +++ b/main.py @@ -201,8 +201,8 @@ if __name__ == '__main__': client.on_connect = mqtt_on_connect client.on_message = mqtt_on_message - client.publish("server-rack-led/power","True") - client.publish("server-rack-led/mode","Rainbow") + client.publish("server-rack-led/power", "True") + client.publish("server-rack-led/mode", "Rainbow") try: client.loop_start() @@ -215,9 +215,7 @@ if __name__ == '__main__': try: r except NameError: - r = "255" - g = "0" - b = "0" + client.publish("server-rack-led/rgb", "255,0,0") setColor(strip, Color(int(r), int(g), int(b))) time.sleep(1) else: