From 31e0664aa6aaf95f93b240c3e8beb0050e966513 Mon Sep 17 00:00:00 2001 From: LailaTheElf Date: Sun, 18 May 2025 21:38:08 +0200 Subject: [PATCH] alarm: allow for time with seconds --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/automation/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f1fb61..a52bda5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -358,7 +358,7 @@ dependencies = [ [[package]] name = "mqttAutomation" -version = "1.3.1" +version = "1.3.2" dependencies = [ "chrono", "crossbeam", diff --git a/Cargo.toml b/Cargo.toml index 50f44af..fd781db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mqttAutomation" -version = "1.3.1" +version = "1.3.2" edition = "2021" [dependencies] diff --git a/src/automation/mod.rs b/src/automation/mod.rs index 492674f..1f17e93 100644 --- a/src/automation/mod.rs +++ b/src/automation/mod.rs @@ -132,7 +132,7 @@ impl Automation { if topic.starts_with("alarm/set") { let mut time = message.payload.split(':'); - if time.clone().count() != 2 { + if time.clone().count() != 2 && time.clone().count() != 3 { println!("ERROR: config_message_in: alarm/set has invalid payload. incorect number of slices ({})", message.payload) } else {