ESPHome
2026.1.5
Loading...
Searching...
No Matches
esphome
components
radon_eye_ble
radon_eye_listener.cpp
Go to the documentation of this file.
1
#include "
radon_eye_listener.h
"
2
#include "
esphome/core/helpers.h
"
3
#include "
esphome/core/log.h
"
4
5
#ifdef USE_ESP32
6
7
namespace
esphome
{
8
namespace
radon_eye_ble {
9
10
static
const
char
*
const
TAG =
"radon_eye_ble"
;
11
12
bool
RadonEyeListener::parse_device
(
const
esp32_ble_tracker::ESPBTDevice
&device) {
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
esphome::esp32_ble_tracker::ESPBTDevice
Definition
esp32_ble_tracker.h:71
esphome::esp32_ble_tracker::ESPBTDevice::address_str_to
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.
Definition
esp32_ble_tracker.h:78
esphome::esp32_ble_tracker::ESPBTDevice::get_name
const std::string & get_name() const
Definition
esp32_ble_tracker.h:89
esphome::radon_eye_ble::RadonEyeListener::parse_device
bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override
Definition
radon_eye_listener.cpp:12
helpers.h
log.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
radon_eye_listener.h
Generated by
1.12.0