From de6acca1eba34c265550be48753f2f2a2062bbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 27 Dec 2022 19:36:58 +0100 Subject: [PATCH] added status publish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index c61c1da..9c4c67d 100644 --- a/main.py +++ b/main.py @@ -134,12 +134,14 @@ if __name__ == '__main__': topic = str(msg.topic) payload = str(msg.payload.decode("utf-8")) if topic == "server-rack-led/power": + client.publish("server-rack-led/power/status", str(payload)) global power power = payload global singleExecute singleExecute = True elif topic == "server-rack-led/rgb": + client.publish("server-rack-led/rgb/status", str(payload)) splitted_payload = payload.split(",") global r r = str(splitted_payload[0]) @@ -149,6 +151,7 @@ if __name__ == '__main__': b = str(splitted_payload[2]) elif topic == "server-rack-led/mode": + client.publish("server-rack-led/mode/status", str(payload)) if payload == "Rainbow": global mode mode = 0