Improve handling of override_schedule
This commit is contained in:
parent
473832f58a
commit
929985c64a
4 changed files with 43 additions and 33 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue