#8 Relais ein / ausschalten von Ocotprint aus
This commit is contained in:
parent
81b5f2e5c3
commit
bb9795b6df
@ -22,27 +22,7 @@ $(function() {
|
||||
}
|
||||
|
||||
self.onmystromswitchEvent = function() {
|
||||
if (self.onOffButtonEnabled()) {
|
||||
$.ajax({
|
||||
url: API_BASEURL + "plugin/mystromswitch",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({
|
||||
command: "enableRelais",
|
||||
}),
|
||||
contentType: "application/json; charset=UTF-8"
|
||||
})
|
||||
} else {
|
||||
$.ajax({
|
||||
url: API_BASEURL + "plugin/mystromswitch",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({
|
||||
command: "disableRelais",
|
||||
}),
|
||||
contentType: "application/json; charset=UTF-8"
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
self.onOffButtonEnabled.subscribe(self.onmystromswitchEvent, self);
|
||||
|
Loading…
Reference in New Issue
Block a user