mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-07 14:41:24 +02:00
When a printer shuts down it sends a final MQTT message with tray_exist_bits=0 and power_on_flag=false. The tray_exist_bits clearing code processed this all-zero value, wiping every AMS slot's filament data. On reconnect, the auto-unlink check saw empty tray data (no color, no type) and deleted all spool assignments as "fingerprint mismatch". Fix: skip tray_exist_bits slot clearing when power_on_flag is false. Defaults to true when absent for backwards compatibility. Adds 3 regression tests covering shutdown preservation, genuine removal still working, and missing power_on_flag fallback.