changed rgb payload methode

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-02 00:23:32 +02:00
parent 5ba4ca8d8e
commit bb2146c322
1 changed files with 4 additions and 4 deletions

View File

@ -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":