From ef55a79a5e62f65a51390e4b05662fbff0e6c372 Mon Sep 17 00:00:00 2001 From: cdnninja Date: Thu, 2 Jan 2025 18:05:08 -0700 Subject: [PATCH] fix: dashes cause failure to login (#115) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- yoto_api/YotoMQTTClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yoto_api/YotoMQTTClient.py b/yoto_api/YotoMQTTClient.py index db85dc5..f5d4f69 100644 --- a/yoto_api/YotoMQTTClient.py +++ b/yoto_api/YotoMQTTClient.py @@ -25,7 +25,7 @@ def connect_mqtt(self, token: Token, players: dict, callback): # mqtt.CallbackAPIVersion.VERSION1, userdata = (players, callback) self.client = mqtt.Client( - client_id="YOTOAPI" + next(reversed(players)), + client_id="YOTOAPI" + next(iter(players)).replace("-", ""), transport="websockets", userdata=userdata, )