From 96280e4a4bb146147246d9115e23e982d706f6c4 Mon Sep 17 00:00:00 2001 From: David Zingg Date: Sun, 28 Jun 2020 14:48:32 +0200 Subject: [PATCH] #21 Add PowerOFF when print is finished --- .idea/workspace.xml | 18 ++++++++++-------- octoprint_mystromswitch/__init__.py | 8 ++++---- .../templates/mystromswitch_sidebar.jinja2 | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f5747ff..fd43c5e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,6 +2,8 @@ + + diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 627d336..632924d 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -276,10 +276,10 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, def on_event(self, event, payload): if event == Events.CLIENT_OPENED: - self._plugin_manager.send_plugin_message(self._identifier, - dict(automaticShutdownEnabled=self.shutdownAfterPrintFinished)) - self._plugin_manager.send_plugin_message(self._identifier, - dict(automaticPowerOffEnabled=self.powerOffAfterPrintFinished)) + #self._plugin_manager.send_plugin_message(self._identifier, + # dict(automaticShutdownEnabled=self.shutdownAfterPrintFinished)) + #self._plugin_manager.send_plugin_message(self._identifier, + # dict(automaticPowerOffEnabled=self.powerOffAfterPrintFinished)) return if not self.shutdownAfterPrintFinished and not self.powerOffAfterPrintFinished: diff --git a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 index b502b91..c063687 100644 --- a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 +++ b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 @@ -3,12 +3,12 @@