mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
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:
parent
ec20778d83
commit
d76f18b4f2
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue