subscribe to clock/dow

This commit is contained in:
Laila van Reenen 2025-01-27 09:20:18 +01:00
parent bf03ecda12
commit 53beba07fa
Signed by: LailaTheElf
GPG Key ID: 8A3EF0226518C12D
3 changed files with 6 additions and 2 deletions

2
Cargo.lock generated
View File

@ -289,7 +289,7 @@ dependencies = [
[[package]] [[package]]
name = "mqttAutomation" name = "mqttAutomation"
version = "1.1.0" version = "1.1.1"
dependencies = [ dependencies = [
"crossbeam", "crossbeam",
"json", "json",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mqttAutomation" name = "mqttAutomation"
version = "1.1.0" version = "1.1.1"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@ -118,6 +118,10 @@ impl mqtt_client::MqttTool for Automation {
Err(e) => println!("ERROR: main: faild to subscribe to clock/hour ({})", e), Err(e) => println!("ERROR: main: faild to subscribe to clock/hour ({})", e),
Ok(_) => {} Ok(_) => {}
} }
match client.subscribe("clock/dow", rumqttc::QoS::AtMostOnce) {
Err(e) => println!("ERROR: main: faild to subscribe to clock/dow ({})", e),
Ok(_) => {}
}
match client.subscribe("/cool/devices/KNMITemp/values", rumqttc::QoS::AtMostOnce) { match client.subscribe("/cool/devices/KNMITemp/values", rumqttc::QoS::AtMostOnce) {
Err(e) => println!("ERROR: main: faild to subscribe to KNMITemp/values ({})", e), Err(e) => println!("ERROR: main: faild to subscribe to KNMITemp/values ({})", e),
Ok(_) => {} Ok(_) => {}