#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg
2020-02-29 17:04:39 +01:00
parent 531d795615
commit b5d23ef46f
3 changed files with 53 additions and 42 deletions

View File

@ -62,8 +62,8 @@ $(function() {
})
}
self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self);
self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self);
//self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self);
//self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self);
self.onDataUpdaterPluginMessage = function(plugin, data) {
if (plugin != "mystromswitch" && plugin != "octoprint_mystromswitch") {

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(), checked: automaticShutdownEnabled">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: onAutomaticShutdownEnabledChanged">
{{ _('Shutdown Octoprint after print finishes') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: onAutomaticPowerOffEnabledChanged">
{{ _('Power Off Relais after print finishes') }}
</label>
</div>