parent
99d1876dec
commit
d37085eac7
7
main.py
7
main.py
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue