diff options
-rwxr-xr-x | bigclown-leds | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bigclown-leds b/bigclown-leds index 4d635fc..d988bdf 100755 --- a/bigclown-leds +++ b/bigclown-leds @@ -12,7 +12,8 @@ def on_connect(client, userdata, flags, rc): # The callback for when a PUBLISH message is received from the server. def on_message(client, userdata, msg): - topic = msg.topic[26:] + ptopic = msg.topic.split("/") + topic = "/".join(ptopic[ptopic.index("led") + 1 :]) if topic == "effect/set": # Well for now just this way client.publish( |