Add handler for relays (and schedules) in controller

This commit is contained in:
Tobias Reisinger 2024-04-23 01:43:32 +02:00
parent 55a352f85a
commit 45e128361a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 88 additions and 6 deletions
emgauwa-lib/src/types

View file

@ -42,6 +42,17 @@ impl Debug for ScheduleUid {
}
}
impl PartialEq for ScheduleUid {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Off, Self::Off) => true,
(Self::On, Self::On) => true,
(Self::Any(my_uuid), Self::Any(other_uuid)) => my_uuid == other_uuid,
_ => false,
}
}
}
impl Type<Sqlite> for ScheduleUid {
fn type_info() -> SqliteTypeInfo {
<&[u8] as Type<Sqlite>>::type_info()