Adjusted for new status API
This commit is contained in:
parent
07ef866de1
commit
ffdf05f9e8
1 changed files with 4 additions and 4 deletions
|
@ -137,10 +137,10 @@
|
||||||
previousStatus = currentStatus;
|
previousStatus = currentStatus;
|
||||||
currentStatus = data;
|
currentStatus = data;
|
||||||
|
|
||||||
setText("status", data.status);
|
setText("status", data.title);
|
||||||
|
|
||||||
if (data.status.toLowerCase() === "sleeping") {
|
if (data.title.toLowerCase() === "sleeping") {
|
||||||
const remainingText = formatRemainingTime(data.time_until_wake);
|
const remainingText = formatRemainingTime(data.remainingDuration);
|
||||||
setText("sleep", "Time until wake up:<br><span class='info'>" + remainingText + "</span>");
|
setText("sleep", "Time until wake up:<br><span class='info'>" + remainingText + "</span>");
|
||||||
} else {
|
} else {
|
||||||
setText("sleep", "");
|
setText("sleep", "");
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function hasWakenUp() {
|
function hasWakenUp() {
|
||||||
return previousStatus && previousStatus.status.toLowerCase() === "sleeping" && currentStatus.status.toLowerCase() !== "sleeping";
|
return previousStatus && previousStatus.title.toLowerCase() === "sleeping" && currentStatus.title.toLowerCase() !== "sleeping";
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableNotifications() {
|
function enableNotifications() {
|
||||||
|
|
Loading…
Reference in a new issue