splash: fix power_device appearing if configured in ks.conf but not available in the server

This commit is contained in:
alfrix 2022-12-10 12:26:39 -03:00
parent 778cd84ba8
commit 74338a7f3e

View File

@ -74,7 +74,7 @@ class SplashScreenPanel(ScreenPanel):
self.clear_action_bar()
if self.ks_printer_cfg is not None and self._screen._ws.connected:
power_devices = self.ks_printer_cfg.get("power_devices", "")
if power_devices:
if power_devices and self._printer.get_power_devices():
logging.info(f"Associated power devices: {power_devices}")
self.add_power_button(power_devices)