forked from sigil-03/power
add set functionality to control outlets
This commit is contained in:
parent
987150c9b6
commit
633a57ff23
5 changed files with 42 additions and 22 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::types::Error;
|
||||
use crate::types::{Error, PowerState};
|
||||
|
||||
pub trait Control {
|
||||
async fn set_power(&self) -> Result<(), Error>;
|
||||
async fn set_power(&self, state: PowerState) -> Result<(), Error>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue