From d83433f60c43d5e2b1ac7d8e437864dffbfd8d7b Mon Sep 17 00:00:00 2001 From: jneilliii Date: Wed, 9 Aug 2023 00:12:44 -0400 Subject: [PATCH] add heaters to ignore for idle timeout processing, #202 --- octoprint_tasmota/__init__.py | 8 +++++--- octoprint_tasmota/templates/tasmota_settings.jinja2 | 8 ++++++++ setup.py | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) 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 @@ +
+
+ +
+ +
+
+
diff --git a/setup.py b/setup.py index 41e2606..c2a65c4 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-Tasmota" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.1.4rc1" +plugin_version = "1.1.4rc2" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module