[DISC] always auto-discover Presence/Tracker timeout (#1959)
auto-discover Presence/Tracker timeout even when HASS presence is not active Also inject an additional placeholder rssi key and value into the BM2 voltage connection message to avoid the message being registered as a device tracker AWAY https://community.openmqttgateway.com/t/bm2-home-and-away/3315
This commit is contained in:
1 parent
6e906702ed
commit
d538316e03
3 files changed
+11
-15
No files matched your search
@@ -301,6 +301,8 @@ void BM2_connect::notifyCB(NimBLERemoteCharacteristic* pChar, uint8_t* pData, si
|
||||
float volt = ((output[2] | (output[1] << 8)) >> 4) / 100.0f;
|
||||
BLEdata["volt"] = volt;
|
||||
Log.trace(F("volt: %F" CR), volt);
|
||||
// to avoid the BM2 device tracker going offline because of the voltage MQTT message without an RSSI value
|
||||
BLEdata["rssi"] = -60;
|
||||
buildTopicFromId(BLEdata, subjectBTtoMQTT);
|
||||
handleJsonEnqueue(BLEdata, QueueSemaphoreTimeOutTask);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user