diff --git a/main.py b/main.py index ce8ede5..c672fe8 100644 --- a/main.py +++ b/main.py @@ -169,8 +169,13 @@ if __name__ == '__main__': power = payload elif topic == "server-rack-led/rgb": + json_payload = json.loads(dict(payload)) 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": if payload == "0":