Add check for wearing status and set status accordingly

master
Ishidres 2024-03-11 18:17:00 +01:00
parent c046fcd182
commit 7325cc4d3a
1 changed files with 3 additions and 0 deletions

View File

@ -167,9 +167,12 @@ if (sleeplog.conf.enabled) {
// check if changing to deep sleep from non sleeping
if (data.status === 4 && sleeplog.status <= 2) {
// check wearing status
// if not worn set status to not worn
if (sleeplog.isNotWorn()) {
data.status = 1;
}
sleeplog.setStatus(data);
/*
sleeplog.checkIsWearing((isWearing, data) => {