diff --git a/octoprint_tasmota/__init__.py b/octoprint_tasmota/__init__.py index 634c455..46cf08b 100644 --- a/octoprint_tasmota/__init__.py +++ b/octoprint_tasmota/__init__.py @@ -171,6 +171,7 @@ def get_settings_defaults(self): "powerOffWhenIdle": False, "idleTimeout": 30, "idleIgnoreCommands": 'M105', + "idleIgnoreHeaters": '', "idleTimeoutWaitTemp": 50, "idleWaitForTimelapse": True, "event_on_upload_monitoring": False, @@ -980,11 +981,12 @@ def _wait_for_timelapse(self): def _wait_for_heaters(self): self._waitForHeaters = True heaters = self._printer.get_current_temperatures() + ignored_heaters = self._settings.get(["idleIgnoreHeaters"]).split(',') for heater, entry in heaters.items(): target = entry.get("target") - if target is None: - # heater doesn't exist in fw + if target is None or heater in ignored_heaters: + # heater doesn't exist in fw or set to be ignored continue try: @@ -1010,7 +1012,7 @@ def _wait_for_heaters(self): highest_temp = 0 heaters_above_waittemp = [] for heater, entry in heaters.items(): - if not heater.startswith("tool"): + if not heater.startswith("tool") or heater in ignored_heaters: continue actual = entry.get("actual") diff --git a/octoprint_tasmota/templates/tasmota_settings.jinja2 b/octoprint_tasmota/templates/tasmota_settings.jinja2 index b0e3925..d3adbea 100644 --- a/octoprint_tasmota/templates/tasmota_settings.jinja2 +++ b/octoprint_tasmota/templates/tasmota_settings.jinja2 @@ -207,6 +207,14 @@ +