Update radon_eye_listener.cpp (#5401)

New devices identifiers do not star by the hardcoded string. FR:RE222 is the 8-char length string of my devices bought in 2023. This proposal aims at solve the topic by making the detection track devices starting only by FR:R
This commit is contained in:
rmmacias 2023-09-17 07:18:51 +02:00 committed by GitHub
parent 55b5c0fc32
commit b5f2d69ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ static const char *const TAG = "radon_eye_ble";
bool RadonEyeListener::parse_device(const esp32_ble_tracker::ESPBTDevice &device) {
if (not device.get_name().empty()) {
if (device.get_name().rfind("FR:R20:SN", 0) == 0) {
if (device.get_name().rfind("FR:R", 0) == 0) {
// This is an RD200, I think
ESP_LOGD(TAG, "Found Radon Eye RD200 device Name: %s (MAC: %s)", device.get_name().c_str(),
device.address_str().c_str());