#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg 2020-06-28 14:56:17 +02:00
parent 96280e4a4b
commit cc1254f7f9
3 changed files with 12 additions and 12 deletions

18
.idea/workspace.xml generated
View File

@ -3,7 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/static/js/mystromswitch.js" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/static/js/mystromswitch.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -49,13 +49,6 @@
<option name="presentableId" value="Default" />
<updated>1574193087583</updated>
</task>
<task id="LOCAL-00028" summary="#8 Relais ein / ausschalten von Ocotprint aus&#10;&#10;- url korrigiert">
<created>1574606064523</created>
<option name="number" value="00028" />
<option name="presentableId" value="LOCAL-00028" />
<option name="project" value="LOCAL" />
<updated>1574606064523</updated>
</task>
<task id="LOCAL-00029" summary="#8 Relais ein / ausschalten von Ocotprint aus">
<created>1574606292074</created>
<option name="number" value="00029" />
@ -392,7 +385,14 @@
<option name="project" value="LOCAL" />
<updated>1593348030528</updated>
</task>
<option name="localTasksCounter" value="77" />
<task id="LOCAL-00077" summary="#21 Add PowerOFF when print is finished">
<created>1593348512259</created>
<option name="number" value="00077" />
<option name="presentableId" value="LOCAL-00077" />
<option name="project" value="LOCAL" />
<updated>1593348512259</updated>
</task>
<option name="localTasksCounter" value="78" />
<servers />
</component>
<component name="UnknownFeatures">

View File

@ -50,7 +50,7 @@ $(function() {
self.onAutomaticPowerOffEnabledChanged = function(){
var cmd = "disablePowerOffAfterFinish";
if (self.automaticShutdownEnabled()) {
if (self.automaticPowerOffEnabled()) {
var cmd = "enablePowerOffAfterFinish";
}
$.ajax({

View File

@ -3,12 +3,12 @@
<label class="control-label" id="mystromswitchEnergyValue">Energy 0.0Wh</label>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent, visible : onOffButtonEnabled">{{ _('Toggle Relais') }}</button>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), change: automaticShutdownEnabled, visible :showShutdownOctopiOption">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticShutdownEnabled, visible :showShutdownOctopiOption">
{{ _('Shutdown Octoprint after print finishes') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), change: automaticPowerOffEnabled, visible: showPowerOffPrintFinishOption">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled, visible: showPowerOffPrintFinishOption">
{{ _('Power Off Relais after print finishes') }}
</label>
</div>