Skip to content

Commit af00f86

Browse files
committed
clear _autostart_file on print canceled or done events, #244
1 parent 0767626 commit af00f86

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

octoprint_tplinksmartplug/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ def on_event(self, event, payload):
614614
self._tplinksmartplug_logger.debug("Print cancelled, resetting job_power to 0")
615615
self.print_job_power = 0.0
616616
self.print_job_started = False
617+
self._autostart_file = None
617618
return
618619
# Print Started Event
619620
if event == Events.PRINT_STARTED and self._settings.getFloat(["cost_rate"]) > 0:
@@ -672,6 +673,7 @@ def on_event(self, event, payload):
672673

673674
self.print_job_power = 0.0
674675
self.print_job_started = False
676+
self._autostart_file = None
675677

676678
if self.powerOffWhenIdle == True and event == Events.MOVIE_RENDERING:
677679
self._tplinksmartplug_logger.debug("Timelapse generation started: %s" % payload.get("movie_basename", ""))

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "OctoPrint-TPLinkSmartplug"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "0.9.26"
17+
plugin_version = "1.0.0rc1"
1818

1919
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
2020
# module

0 commit comments

Comments
 (0)