Removed old notification system
All checks were successful
Build and deploy / build (push) Successful in 8m50s
Build and deploy / Deploy container (push) Successful in 39s

This commit is contained in:
2025-08-31 00:56:42 +02:00
parent 6c9d2c16c1
commit 03dcd44e0e
4 changed files with 3 additions and 35 deletions

View File

@@ -9,7 +9,7 @@ use tokio_cron_scheduler::{Job, JobScheduler};
use tracing::{debug, instrument, trace};
use crate::device::Device;
use crate::event::{Event, EventChannel, OnDarkness, OnMqtt, OnNotification, OnPresence};
use crate::event::{Event, EventChannel, OnDarkness, OnMqtt, OnPresence};
pub type DeviceMap = HashMap<String, Box<dyn Device>>;
@@ -118,22 +118,6 @@ impl DeviceManager {
}
});
join_all(iter).await;
}
Event::Ntfy(notification) => {
let devices = self.devices.read().await;
let iter = devices.iter().map(|(id, device)| {
let notification = notification.clone();
async move {
let device: Option<&dyn OnNotification> = device.cast();
if let Some(device) = device {
trace!(id, "Handling");
device.on_notification(notification).await;
trace!(id, "Done");
}
}
});
join_all(iter).await;
}
}