ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::xiaomi_ble::XiaomiDevice Class Referenceabstract

A Xiaomi MiBeacon device: matches its address, decodes each frame once and hands it to publish_result(). More...

#include <xiaomi_ble.h>

Inheritance diagram for esphome::xiaomi_ble::XiaomiDevice:
esphome::ble_device_base::ESPBTDeviceListener esphome::xiaomi_ble::XiaomiEncryptedDevice esphome::xiaomi_gcls002::XiaomiGCLS002 esphome::xiaomi_hhccjcy01::XiaomiHHCCJCY01 esphome::xiaomi_hhccpot002::XiaomiHHCCPOT002 esphome::xiaomi_jqjcy01ym::XiaomiJQJCY01YM esphome::xiaomi_lywsd02::XiaomiLYWSD02 esphome::xiaomi_lywsdcgq::XiaomiLYWSDCGQ esphome::xiaomi_mhoc303::XiaomiMHOC303 esphome::xiaomi_mue4094rt::XiaomiMUE4094RT esphome::xiaomi_wx08zm::XiaomiWX08ZM

Public Member Functions

void set_address (uint64_t address)
 
bool parse_device (const ble_device_base::ESPBTDevice &device) override
 
- Public Member Functions inherited from esphome::ble_device_base::ESPBTDeviceListener
virtual ~ESPBTDeviceListener ()=default
 
virtual void on_scan_end ()
 Called at the end of each scan duration period.
 

Protected Member Functions

bool parse_xiaomi_device_ (const ble_device_base::ESPBTDevice &device, const uint8_t *bindkey)
 Encrypted frames are dropped when bindkey is null.
 
virtual void publish_result (const XiaomiParseResult &result)=0
 

Protected Attributes

uint64_t address_ {0}
 
optional< uint8_t > last_frame_count_
 

Detailed Description

A Xiaomi MiBeacon device: matches its address, decodes each frame once and hands it to publish_result().

Definition at line 75 of file xiaomi_ble.h.

Member Function Documentation

◆ parse_device()

bool esphome::xiaomi_ble::XiaomiDevice::parse_device ( const ble_device_base::ESPBTDevice & device)
inlineoverridevirtual

◆ parse_xiaomi_device_()

bool esphome::xiaomi_ble::XiaomiDevice::parse_xiaomi_device_ ( const ble_device_base::ESPBTDevice & device,
const uint8_t * bindkey )
protected

Encrypted frames are dropped when bindkey is null.

Definition at line 419 of file xiaomi_ble.cpp.

◆ publish_result()

◆ set_address()

void esphome::xiaomi_ble::XiaomiDevice::set_address ( uint64_t address)
inline

Definition at line 77 of file xiaomi_ble.h.

Field Documentation

◆ address_

uint64_t esphome::xiaomi_ble::XiaomiDevice::address_ {0}
protected

Definition at line 87 of file xiaomi_ble.h.

◆ last_frame_count_

optional<uint8_t> esphome::xiaomi_ble::XiaomiDevice::last_frame_count_
protected

Definition at line 88 of file xiaomi_ble.h.


The documentation for this class was generated from the following files: