Moved the mqtt topic check up one leve into Devices
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-04-12 04:49:45 +02:00
parent 92c8f3074f
commit 11aa15b59d
5 changed files with 13 additions and 23 deletions

View File

@@ -1,6 +1,5 @@
use async_trait::async_trait;
use google_home::traits;
use rumqttc::matches;
use tracing::{debug, error, warn};
use crate::config::MqttDeviceConfig;
@@ -56,10 +55,6 @@ impl OnMqtt for AudioSetup {
}
async fn on_mqtt(&mut self, message: &rumqttc::Publish) {
if !matches(&message.topic, &self.mqtt.topic) {
return;
}
let action = match RemoteMessage::try_from(message) {
Ok(message) => message.action(),
Err(err) => {