diff --git a/automation_devices/src/ntfy.rs b/automation_devices/src/ntfy.rs index 7b82c8a..78c7ba8 100644 --- a/automation_devices/src/ntfy.rs +++ b/automation_devices/src/ntfy.rs @@ -48,9 +48,7 @@ struct NotificationFinal { #[derive(Debug, Serialize, Clone, Deserialize)] pub struct Notification { - #[serde(skip_serializing_if = "Option::is_none")] - title: Option, - #[serde(skip_serializing_if = "Option::is_none")] + title: String, message: Option, #[serde(skip_serializing_if = "Vec::is_empty", default = "Default::default")] tags: Vec, @@ -61,16 +59,6 @@ pub struct Notification { } impl Notification { - pub fn new() -> Self { - Self { - title: None, - message: None, - tags: Vec::new(), - priority: None, - actions: Vec::new(), - } - } - fn finalize(self, topic: &str) -> NotificationFinal { NotificationFinal { topic: topic.into(), @@ -79,12 +67,6 @@ impl Notification { } } -impl Default for Notification { - fn default() -> Self { - Self::new() - } -} - #[derive(Debug, Clone, LuaDeviceConfig)] pub struct Config { #[device_config(default("https://ntfy.sh".into()))]