diff --git a/main.py b/main.py index c672fe8..284d9cd 100644 --- a/main.py +++ b/main.py @@ -169,13 +169,13 @@ if __name__ == '__main__': power = payload elif topic == "server-rack-led/rgb": - json_payload = json.loads(dict(payload)) + splitted_payload = payload.split(",") global r - r = str(json_payload["r"]) + r = str(splitted_payload[0]) global g - g = str(json_payload["g"]) + g = str(splitted_payload[1]) global b - b = str(json_payload["b"]) + b = str(splitted_payload[2]) elif topic == "server-rack-led/mode": if payload == "0":