#8 Relais ein / ausschalten von Ocotprint aus

- url korrigiert
This commit is contained in:
David Zingg 2019-11-24 15:34:24 +01:00
parent 7a4d53d221
commit 8421bd2339
2 changed files with 2 additions and 3 deletions

View File

@ -11,7 +11,7 @@ $(function() {
self.onToggleRelayEvent = function(){
$.ajax({
url: API_BASEURL + "plugin/mystromswitch",
url: API_BASEURL + "/api/plugin/mystromswitch",
type: "POST",
dataType: "json",
data: JSON.stringify({

View File

@ -1,5 +1,4 @@
<div class="sidebar_plugin_mystromswitch">
<label class="control-label" id="mystromswitchPowerValue">Powerconsumption 0.0W</label>
<span id="myStromRelaisToggleButton" type="button" class="mystromToggleButton">Toggle Relais</span>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent">{{ _('Go') }}</button>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent">{{ _('Toggle Relais') }}</button>
</div>