added rgb def fix

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-02 09:28:12 +02:00
parent 99d1876dec
commit d37085eac7
1 changed files with 3 additions and 4 deletions

View File

@ -94,6 +94,9 @@ if __name__ == '__main__':
mode = 0
power = "True"
r = 255
g = 255
b = 255
mqttBroker ="homeassistant.ping-mee.local"
client = mqtt.Client("server_rack_led")
@ -114,10 +117,6 @@ if __name__ == '__main__':
rainbowCycle(strip)
elif mode == 1:
try:
r
except NameError:
client.publish("server-rack-led/rgb", "255,0,0")
setColor(strip, Color(int(r), int(g), int(b)))
time.sleep(1)
else: