update zigbee2mqtt base topic

This commit is contained in:
Laila van Reenen 2025-09-28 14:25:54 +02:00
parent 4419442101
commit f969dd0a10
Signed by: LailaTheElf
GPG Key ID: 8A3EF0226518C12D
3 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/target
/mqttAutomation-*

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cross build --target aarch64-unknown-linux-gnu --release
cargo build --release

View File

@ -86,10 +86,10 @@ impl Automation {
}});
}
fn lamp01_set(&self, state: bool) {
self.tx_set(String::from("/cool/devices/lamp-01/set"), state);
self.tx_set(String::from("/kees/devices/lamp-01/set"), state);
}
fn pc_sw_set(&self, state: bool) {
self.tx_set(String::from("/cool/devices/sw-01/set"), state);
self.tx_set(String::from("/kees/devices/sw-01/set"), state);
}
fn get_current_time(&self) -> u32 {
@ -247,7 +247,7 @@ impl Automation {
else if message.topic.starts_with("clock/") {
self.clock_message_in(message);
}
else if message.topic.eq("/cool/devices/KNMITemp/values") {
else if message.topic.eq("/kees/devices/KNMITemp/values") {
let payload_json = json_parser::Json::Text(message.payload);
let path = Vec::from([String::from("gr")]);
@ -313,7 +313,7 @@ impl Automation {
println!("ERROR: main: faild to subscribe to automation/alarm/# ({})", e),
Ok(_) => {}
}
match self.client.subscribe("/cool/devices/KNMITemp/values", QoS::AtMostOnce) {
match self.client.subscribe("/kees/devices/KNMITemp/values", QoS::AtMostOnce) {
Err(e) =>
println!("ERROR: main: faild to subscribe to KNMITemp/values ({})", e),
Ok(_) => {}