ESPHome 2026.10.0-dev
Loading...
Searching...
No Matches
radon_eye_listener.cpp
Go to the documentation of this file.
3#include "esphome/core/log.h"
4
6
7static const char *const TAG = "radon_eye_ble";
8
10 // Radon Eye devices have names starting with "FR:"
11 if (device.get_name().starts_with("FR:")) {
12 char addr_buf[MAC_ADDRESS_PRETTY_BUFFER_SIZE];
13 ESP_LOGD(TAG, "Found Radon Eye device Name: %s (MAC: %s)", device.get_name().c_str(),
14 device.address_str_to(addr_buf));
15 }
16 return false;
17}
18
19} // namespace esphome::radon_eye_ble
constexpr const char * c_str() const
Definition string_ref.h:73
bool starts_with(const StringRef &prefix) const
True if the view begins with the given prefix (std::string::starts_with-like)
Definition string_ref.h:80
ESPDEPRECATED("Use address_str_to() instead. Removed in 2027.2.0.", "2026.8.0") std const char * address_str_to(char *buf) const
Return MAC as "XX:XX:XX:XX:XX:XX" string.
StringRef get_name() const
Advertised name as a view into the fixed buffer (always NUL-terminated, so c_str() is safe); converts...
Definition ble_device.h:221
bool parse_device(const ble_device_base::ESPBTDevice &device) override