#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg
2020-07-01 20:32:27 +02:00
parent 0816056ded
commit cba3367d2b
2 changed files with 10 additions and 11 deletions

View File

@ -193,8 +193,8 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
data["automaticShutdownEnabled"] = self.shutdownAfterPrintFinished
data["automaticPowerOffEnabled"] = self.powerOffAfterPrintFinished
self._plugin_manager.send_plugin_message(self._identifier, data)
self._logger.info("automaticShutdownEnabled: %s" % self.automaticShutdownEnabled)
self._logger.info("automaticPowerOffEnabled: %s" % self.automaticPowerOffEnabled)
self._logger.info("automaticShutdownEnabled: %s" % self.shutdownAfterPrintFinished)
self._logger.info("automaticPowerOffEnabled: %s" % self.powerOffAfterPrintFinished)
return
except (requests.exceptions.ConnectionError, ValueError) as e:
self._logger.exception(e)