Add check for wearing status and set status accordingly
parent
c046fcd182
commit
7325cc4d3a
|
|
@ -167,9 +167,12 @@ if (sleeplog.conf.enabled) {
|
||||||
// check if changing to deep sleep from non sleeping
|
// check if changing to deep sleep from non sleeping
|
||||||
if (data.status === 4 && sleeplog.status <= 2) {
|
if (data.status === 4 && sleeplog.status <= 2) {
|
||||||
// check wearing status
|
// check wearing status
|
||||||
|
// if not worn set status to not worn
|
||||||
if (sleeplog.isNotWorn()) {
|
if (sleeplog.isNotWorn()) {
|
||||||
data.status = 1;
|
data.status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleeplog.setStatus(data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
sleeplog.checkIsWearing((isWearing, data) => {
|
sleeplog.checkIsWearing((isWearing, data) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue