#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg 2020-06-28 14:26:15 +02:00
parent 041fe67773
commit 42f80d831c
2 changed files with 12 additions and 16 deletions

View File

@ -47,13 +47,6 @@
<option name="presentableId" value="Default" />
<updated>1574193087583</updated>
</task>
<task id="LOCAL-00022" summary="#6 UI Updates senden und anzeigen">
<created>1574284067356</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1574284067356</updated>
</task>
<task id="LOCAL-00023" summary="#6 UI Updates senden und anzeigen">
<created>1574284365024</created>
<option name="number" value="00023" />
@ -390,7 +383,14 @@
<option name="project" value="LOCAL" />
<updated>1593346830445</updated>
</task>
<option name="localTasksCounter" value="71" />
<task id="LOCAL-00071" summary="#21 Add PowerOFF when print is finished">
<created>1593346998123</created>
<option name="number" value="00071" />
<option name="presentableId" value="LOCAL-00071" />
<option name="project" value="LOCAL" />
<updated>1593346998123</updated>
</task>
<option name="localTasksCounter" value="72" />
<servers />
</component>
<component name="UnknownFeatures">

View File

@ -204,11 +204,9 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._logger.info("disablePowerOffAfterFinish")
self.powerOffAfterPrintFinished = False
self._plugin_manager.send_plugin_message(self._identifier,
dict(showShutdownOctopiOption=self.shutdownAfterPrintFinished,
type="timeout", timeout_value=self._timeout_value))
dict(showShutdownOctopiOption=self.shutdownAfterPrintFinished))
self._plugin_manager.send_plugin_message(self._identifier,
dict(showPowerOffPrintFinishOption=self.powerOffAfterPrintFinished,
type="timeout", timeout_value=self._timeout_value))
dict(showPowerOffPrintFinishOption=self.powerOffAfterPrintFinished))
def get_api_commands(self):
return dict(
@ -279,11 +277,9 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
if event == Events.CLIENT_OPENED:
self._plugin_manager.send_plugin_message(self._identifier,
dict(showShutdownOctopiOption=self.shutdownAfterPrintFinished,
type="timeout", timeout_value=self._timeout_value))
dict(showShutdownOctopiOption=self.shutdownAfterPrintFinished))
self._plugin_manager.send_plugin_message(self._identifier,
dict(showPowerOffPrintFinishOption=self.powerOffAfterPrintFinished,
type="timeout", timeout_value=self._timeout_value))
dict(showPowerOffPrintFinishOption=self.powerOffAfterPrintFinished))
return
if not self.shutdownAfterPrintFinished and not self.powerOffAfterPrintFinished: