Fix presence topic (#1238)

This commit is contained in:
Bad authored and GitHub committed 2022-07-17 04:59:40 -05:00
1 parent c04c62916f
commit 7f4e27a664
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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