Add handler for relay states

This commit is contained in:
Tobias Reisinger 2024-04-25 14:10:32 +02:00
commit 55617dbd7c
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 53 additions and 20 deletions

View file

@ -14,6 +14,8 @@ use crate::models::{Controller, Relay};
pub type Weekday = i64;
pub type RelayStates = Vec<Option<bool>>;
#[derive(Debug, Serialize, Deserialize, Message)]
#[rtype(result = "Result<(), EmgauwaError>")]
pub enum ControllerWsAction {
@ -22,4 +24,5 @@ pub enum ControllerWsAction {
Schedules(Vec<DbSchedule>),
Relays(Vec<Relay>),
Controller(Controller),
RelayStates((ControllerUid, RelayStates)),
}