From 35f33c633d3d4269e021ea17122f0c535bacba8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 2 Jul 2022 00:42:10 +0200 Subject: [PATCH] added mode names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 284d9cd..acf6d77 100644 --- a/main.py +++ b/main.py @@ -178,11 +178,12 @@ if __name__ == '__main__': b = str(splitted_payload[2]) elif topic == "server-rack-led/mode": - if payload == "0": + if payload == "Rainbow": global mode mode = 0 - elif payload == "1": + elif payload == "Custom Color": mode = 1 + strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL) strip.begin()