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 Jesse Hills
parent ec20778d83
commit d76f18b4f2
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

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());