#22 Button taucht nicht auf

Fehler anzeigen wenn Verbindung zu switch nicht klappt
This commit is contained in:
David Zingg
2020-02-29 16:28:30 +01:00
parent 3d7cb06446
commit cc106e258c
2 changed files with 11 additions and 1 deletions

View File

@ -70,11 +70,15 @@ $(function() {
return;
}
self.onOffButtonEnabled(data.onOffButtonEnabled);
self.showShutdownOctopiOption(data.showShutdownOctopiOption);
self.showPowerOffPrintFinishOption(data.showPowerOffPrintFinishOption);
self.mystromswitchEnergyValue.innerHTML = "Energy: "+data.energy.toFixed(1)+"Wh"
if(data.relay == false){
self.mystromswitchPowerValue.innerHTML = "Relay is off";
} else if (data.power != null) {
self.mystromswitchPowerValue.innerHTML = "Power Consumption "+data.power.toFixed(1)+"W";
}else{
self.mystromswitchPowerValue.innerHTML = "myStrom switch not reachable"
}
}
}