Add handler for relay states
This commit is contained in:
parent
82f2d49dc6
commit
55617dbd7c
8 changed files with 53 additions and 20 deletions
|
|
@ -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)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue