ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
xiaomi_rtcgq02lm.h
Go to the documentation of this file.
1#pragma once
2
5#ifdef USE_BINARY_SENSOR
7#endif
8#ifdef USE_SENSOR
10#endif
13
14#ifdef USE_ESP32
15
17
19 public:
20 void set_address(uint64_t address) { address_ = address; };
21 void set_bindkey(const char *bindkey);
22
23 bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override;
24 void dump_config() override;
25
26#ifdef USE_BINARY_SENSOR
27 void set_motion(binary_sensor::BinarySensor *motion) { this->motion_ = motion; }
28 void set_motion_timeout(uint16_t timeout) { this->motion_timeout_ = timeout; }
29
30 void set_light(binary_sensor::BinarySensor *light) { this->light_ = light; }
31 void set_button(binary_sensor::BinarySensor *button) { this->button_ = button; }
32 void set_button_timeout(uint16_t timeout) { this->button_timeout_ = timeout; }
33#endif
34
35#ifdef USE_SENSOR
36 void set_battery_level(sensor::Sensor *battery_level) { battery_level_ = battery_level; }
37#endif
38
39 protected:
40 uint64_t address_;
41 uint8_t bindkey_[16];
42
43#ifdef USE_BINARY_SENSOR
46
50#endif
51#ifdef USE_SENSOR
53#endif
54};
55
56} // namespace esphome::xiaomi_rtcgq02lm
57
58#endif
uint8_t address
Definition bl0906.h:4
Base class for all binary_sensor-type classes.
Base-class for all sensors.
Definition sensor.h:47
binary_sensor::BinarySensor * motion_
void set_motion(binary_sensor::BinarySensor *motion)
binary_sensor::BinarySensor * button_
void set_button(binary_sensor::BinarySensor *button)
bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override
void set_battery_level(sensor::Sensor *battery_level)
void set_light(binary_sensor::BinarySensor *light)