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;
|
||||
currentStatus = data;
|
||||
|
||||
setText("status", data.status);
|
||||
setText("status", data.title);
|
||||
|
||||
if (data.status.toLowerCase() === "sleeping") {
|
||||
const remainingText = formatRemainingTime(data.time_until_wake);
|
||||
if (data.title.toLowerCase() === "sleeping") {
|
||||
const remainingText = formatRemainingTime(data.remainingDuration);
|
||||
setText("sleep", "Time until wake up:<br><span class='info'>" + remainingText + "</span>");
|
||||
} else {
|
||||
setText("sleep", "");
|
||||
|
@ -155,7 +155,7 @@
|
|||
}
|
||||
|
||||
function hasWakenUp() {
|
||||
return previousStatus && previousStatus.status.toLowerCase() === "sleeping" && currentStatus.status.toLowerCase() !== "sleeping";
|
||||
return previousStatus && previousStatus.title.toLowerCase() === "sleeping" && currentStatus.title.toLowerCase() !== "sleeping";
|
||||
}
|
||||
|
||||
function enableNotifications() {
|
||||
|
|
Loading…
Reference in a new issue