From 4cbcac82e3e057221b7a453a26c5ebaa131d78d9 Mon Sep 17 00:00:00 2001 From: maziggy Date: Sat, 31 Jan 2026 14:35:36 +0100 Subject: [PATCH] Fixed error in scheduler --- backend/app/services/bambu_mqtt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/services/bambu_mqtt.py b/backend/app/services/bambu_mqtt.py index f4063afbe..d1bb21299 100644 --- a/backend/app/services/bambu_mqtt.py +++ b/backend/app/services/bambu_mqtt.py @@ -2031,6 +2031,8 @@ class BambuMQTTClient: ams_mapping2 = [] if ams_mapping is not None: for tray_id in ams_mapping: + # Ensure tray_id is an integer (may be string from JSON) + tray_id = int(tray_id) if tray_id is not None else -1 if tray_id == -1 or tray_id == 255: ams_mapping2.append({"ams_id": 255, "slot_id": 255}) else: