#8 Relais ein / ausschalten von Ocotprint aus

- Button Style auf default geändert
- get_api_commands implementiert
This commit is contained in:
David Zingg
2019-11-24 15:29:45 +01:00
parent 4bd7df899c
commit 7a4d53d221
4 changed files with 8 additions and 17 deletions

View File

@ -9,8 +9,6 @@ $(function() {
self.mystromswitchEnabled = ko.observable();
self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue")
self.mystromToggleButton = document.getElementById("myStromRelaisToggleButton")
self.onToggleRelayEvent = function(){
$.ajax({
url: API_BASEURL + "plugin/mystromswitch",
@ -22,7 +20,6 @@ $(function() {
contentType: "application/json; charset=UTF-8"
})
}
self.mystromToggleButton.addEventListener("click",self.onToggleRelayEvent)
self.onmystromswitchEvent = function() {
if (self.mystromswitchEnabled()) {