This commit is contained in:
2022-10-27 23:36:56 +02:00
parent 1e55385645
commit 01a7576d7f
5 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "hemma"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
[dependencies]

View File

@ -147,7 +147,6 @@ async fn wake_task(
loop {
info!("sleeping until {alarm}");
sleep((alarm - Local::now()).to_std().unwrap()).await;
alarm = next_alarm(Local::now(), day, time);
// slowly turn up brightness of bulb
for brightness in (1..=75).map(|i| (i as f32) * 0.01) {
@ -171,6 +170,8 @@ async fn wake_task(
return;
};
}
alarm = next_alarm(Local::now(), day, time);
}
}