Skip to content

Commit

Permalink
make polling_interval float to allow for sub-minute polling
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Jun 19, 2022
1 parent 7ba092d commit 2bae4b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions octoprint_tasmota/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bae4b6

Please sign in to comment.