Add SetBulbWakeTime client message
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -173,6 +173,7 @@ dependencies = [
|
|||||||
name = "common"
|
name = "common"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"chrono",
|
||||||
"lighter_lib",
|
"lighter_lib",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -5,6 +5,7 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.137", features = ["derive"] }
|
serde = { version = "1.0.137", features = ["derive"] }
|
||||||
|
chrono = { version = "0.4.20", features = ["serde"] }
|
||||||
|
|
||||||
[dependencies.lighter_lib]
|
[dependencies.lighter_lib]
|
||||||
git = "https://git.nubo.sh/hulthe/lighter.git"
|
git = "https://git.nubo.sh/hulthe/lighter.git"
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
use chrono::{NaiveTime, Weekday};
|
||||||
use lighter_lib::{BulbColor, BulbId, BulbMode};
|
use lighter_lib::{BulbColor, BulbId, BulbMode};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -23,8 +24,19 @@ pub enum ClientMessage {
|
|||||||
//SubscribeToInfo,
|
//SubscribeToInfo,
|
||||||
//SubscribeToBulbs,
|
//SubscribeToBulbs,
|
||||||
GetBulbs,
|
GetBulbs,
|
||||||
SetBulbColor { id: BulbId, color: BulbColor },
|
SetBulbColor {
|
||||||
SetBulbPower { id: BulbId, power: bool },
|
id: BulbId,
|
||||||
|
color: BulbColor,
|
||||||
|
},
|
||||||
|
SetBulbPower {
|
||||||
|
id: BulbId,
|
||||||
|
power: bool,
|
||||||
|
},
|
||||||
|
SetBulbWakeTime {
|
||||||
|
id: BulbId,
|
||||||
|
day: Weekday,
|
||||||
|
time: NaiveTime,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A geometric description of rooms/groups of light bulbs
|
/// A geometric description of rooms/groups of light bulbs
|
||||||
|
|||||||
Reference in New Issue
Block a user