printer 3d remaining: set default text
This commit is contained in:
parent
1752ab93e0
commit
8469803c6e
1 changed files with 2 additions and 2 deletions
|
|
@ -151,14 +151,14 @@ const config: Config = {
|
||||||
type: (msg) => {
|
type: (msg) => {
|
||||||
const json = JSON.parse(msg.toString());
|
const json = JSON.parse(msg.toString());
|
||||||
if(!json || !json["time_elapsed"] || !json["time_total"]) {
|
if(!json || !json["time_elapsed"] || !json["time_total"]) {
|
||||||
return "";
|
return "unavailable";
|
||||||
} else {
|
} else {
|
||||||
const secondsLeft = json["time_total"] - json["time_elapsed"];
|
const secondsLeft = json["time_total"] - json["time_elapsed"];
|
||||||
return new Date(secondsLeft * 1000).toISOString().substr(11, 8);
|
return new Date(secondsLeft * 1000).toISOString().substr(11, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultValue: ""
|
defaultValue: "unavailable"
|
||||||
},
|
},
|
||||||
nebenraumPowerStatus: {
|
nebenraumPowerStatus: {
|
||||||
state: {
|
state: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue