ESPHome 2026.1.5
Loading...
Searching...
No Matches
radon_eye_listener.cpp
Go to the documentation of this file.
3#include "esphome/core/log.h"
4
5#ifdef USE_ESP32
6
7namespace esphome {
8namespace radon_eye_ble {
9
10static const char *const TAG = "radon_eye_ble";
11
13 // Radon Eye devices have names starting with "FR:"
14 if (device.get_name().starts_with("FR:")) {
15 char addr_buf[MAC_ADDRESS_PRETTY_BUFFER_SIZE];
16 ESP_LOGD(TAG, "Found Radon Eye device Name: %s (MAC: %s)", device.get_name().c_str(),
17 device.address_str_to(addr_buf));
18 }
19 return false;
20}
21
22} // namespace radon_eye_ble
23} // namespace esphome
24
25#endif
const char * address_str_to(std::span< char, MAC_ADDRESS_PRETTY_BUFFER_SIZE > buf) const
Format MAC address into provided buffer, returns pointer to buffer for convenience.
bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7