printer: tempstore fixup (#1353)

temp from get_stat could be {} if the device is not available
This commit is contained in:
林玮 (Jade Lin)
2024-05-05 02:11:59 +08:00
committed by GitHub
parent 925dbe99ae
commit 7e94c68993
2 changed files with 3 additions and 2 deletions

View File

@@ -256,7 +256,7 @@ class BasePanel(ScreenPanel):
return
for device in self._printer.get_temp_devices():
temp = self._printer.get_stat(device, "temperature")
if temp is not None and device in self.labels:
if temp and device in self.labels:
name = ""
if not (device.startswith("extruder") or device.startswith("heater_bed")):
if self.titlebar_name_type == "full":