Devices now handles subscribing to mqtt topics

This commit is contained in:
2023-04-12 04:37:16 +02:00
parent 34e5274e0b
commit 92c8f3074f
12 changed files with 93 additions and 63 deletions

View File

@@ -12,6 +12,7 @@ use tokio::sync::broadcast;
#[async_trait]
#[impl_cast::device_trait]
pub trait OnMqtt {
fn topics(&self) -> Vec<&str>;
async fn on_mqtt(&mut self, message: &Publish);
}