alarm: allow for time with seconds
This commit is contained in:
parent
6d5340e9ca
commit
31e0664aa6
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -358,7 +358,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mqttAutomation"
|
name = "mqttAutomation"
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossbeam",
|
"crossbeam",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mqttAutomation"
|
name = "mqttAutomation"
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -132,7 +132,7 @@ impl Automation {
|
|||||||
if topic.starts_with("alarm/set") {
|
if topic.starts_with("alarm/set") {
|
||||||
|
|
||||||
let mut time = message.payload.split(':');
|
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)
|
println!("ERROR: config_message_in: alarm/set has invalid payload. incorect number of slices ({})", message.payload)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user