From 7f4e27a664eaf944b0382720d95fd1b41c7e57eb Mon Sep 17 00:00:00 2001 From: Bad Date: Sun, 17 Jul 2022 11:59:40 +0200 Subject: [PATCH] Fix presence topic (#1238) --- main/ZgatewayBT.ino | 2 +- main/config_BT.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index 031c456..2e8456e 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -119,7 +119,7 @@ void pubBTMainCore(JsonObject& data, bool haPresenceEnabled = true) { data["id"] = data["uuid"]; } # endif - String topic = String(Base_Topic) + "home_presence/" + String(gateway_name); + String topic = String(mqtt_topic) + subjectHomePresence + String(gateway_name); Log.trace(F("Pub HA Presence %s" CR), topic.c_str()); pub_custom_topic((char*)topic.c_str(), data, false); } diff --git a/main/config_BT.h b/main/config_BT.h index 2f6acc8..782f136 100644 --- a/main/config_BT.h +++ b/main/config_BT.h @@ -132,7 +132,7 @@ bool hassPresence = HassPresence; #endif /*-------------------HOME ASSISTANT ROOM PRESENCE ----------------------*/ -#define subjectHomePresence "home_presence/" // will send Home Assistant room presence message to this topic (first part is same for all rooms, second is room name) +#define subjectHomePresence "presence/" // will send Home Assistant room presence message to this topic (first part is same for all rooms, second is room name) #ifndef useBeaconUuidForPresence # define useBeaconUuidForPresence false // //define true to use iBeacon UUID as for presence, instead of sender mac (random) address