add basic mode request handling

This commit is contained in:
2023-02-15 11:19:23 +01:00
parent 933f94f687
commit 943ae821de
5 changed files with 153 additions and 121 deletions

View File

@ -32,19 +32,6 @@ pub trait PowerSwitcherCommandSender {
fn send_switch_on_cmd(&mut self, switch_id: SwitchId) -> Result<(), Self::Error>;
fn send_switch_off_cmd(&mut self, switch_id: SwitchId) -> Result<(), Self::Error>;
fn switch_on<T: PowerSwitch>(
&mut self,
switch: &mut T,
) -> Result<(), <T as PowerSwitch>::Error> {
switch.switch_on()
}
fn switch_off<T: PowerSwitch>(
&mut self,
switch: &mut T,
) -> Result<(), <T as PowerSwitch>::Error> {
switch.switch_off()
}
}
pub trait PowerSwitchInfo {