changed mothode to get colors for mode 2 with new topic
Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>master
parent
a43c5a36fc
commit
5ba4ca8d8e
7
main.py
7
main.py
|
@ -169,8 +169,13 @@ if __name__ == '__main__':
|
||||||
power = payload
|
power = payload
|
||||||
|
|
||||||
elif topic == "server-rack-led/rgb":
|
elif topic == "server-rack-led/rgb":
|
||||||
|
json_payload = json.loads(dict(payload))
|
||||||
global r
|
global r
|
||||||
r = payload
|
r = str(json_payload["r"])
|
||||||
|
global g
|
||||||
|
g = str(json_payload["g"])
|
||||||
|
global b
|
||||||
|
b = str(json_payload["b"])
|
||||||
|
|
||||||
elif topic == "server-rack-led/mode":
|
elif topic == "server-rack-led/mode":
|
||||||
if payload == "0":
|
if payload == "0":
|
||||||
|
|
Loading…
Reference in New Issue