Improve handling of override_schedule

This commit is contained in:
Tobias Reisinger 2024-05-28 21:17:21 +02:00
commit 929985c64a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 43 additions and 33 deletions

View file

@ -2,10 +2,12 @@ mod emgauwa_now;
mod emgauwa_uid;
mod request;
mod schedule_uid;
mod relay_state;
use actix::Message;
pub use emgauwa_now::EmgauwaNow;
pub use emgauwa_uid::EmgauwaUid;
pub use relay_state::{RelayState, RelayStates};
pub use request::*;
pub use schedule_uid::ScheduleUid;
use serde_derive::{Deserialize, Serialize};
@ -16,14 +18,6 @@ use crate::models::{Controller, Relay};
pub type Weekday = i64;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RelayState {
pub active_schedule: DbSchedule,
pub is_on: Option<bool>
}
pub type RelayStates = Vec<RelayState>;
#[derive(Debug, Serialize, Deserialize, Message)]
#[rtype(result = "Result<(), EmgauwaError>")]
pub enum ControllerWsAction {