From 2bae4b6eaa913a813837fca9913a8ee170e36fca Mon Sep 17 00:00:00 2001 From: jneilliii Date: Sun, 19 Jun 2022 13:00:50 -0400 Subject: [PATCH] make polling_interval float to allow for sub-minute polling --- octoprint_tasmota/__init__.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octoprint_tasmota/__init__.py b/octoprint_tasmota/__init__.py index 424a024..6036fc4 100644 --- a/octoprint_tasmota/__init__.py +++ b/octoprint_tasmota/__init__.py @@ -149,7 +149,7 @@ def on_startup(self, host, port): def on_after_startup(self): self._logger.info("Tasmota loaded!") if self._settings.get_boolean(["polling_enabled"]) and self._settings.get_int(["polling_interval"]) > 0: - self.poll_status = RepeatedTimer(int(self._settings.get_int(["polling_interval"])) * 60, + self.poll_status = RepeatedTimer(float(self._settings.get_float(["polling_interval"])) * 60, self.check_statuses) self.poll_status.start() @@ -226,7 +226,7 @@ def on_settings_save(self, data): self.poll_status.cancel() if new_polling_value: - self.poll_status = RepeatedTimer(int(self._settings.get(["pollingInterval"])) * 60, self.check_statuses) + self.poll_status = RepeatedTimer(self._settings.get_float(["pollingInterval"]) * 60, self.check_statuses) self.poll_status.start() def get_settings_version(self): diff --git a/setup.py b/setup.py index e200cdb..96d7d61 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.3rc1" +plugin_version = "1.1.3rc2" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module