ESPHome 2026.10.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
15
17 public:
18 void set_address(uint64_t address) { address_ = address; };
19 void set_bindkey(const char *bindkey);
20
21 bool parse_device(const ble_device_base::ESPBTDevice &device) override;
22 void dump_config() override;
23
24#ifdef USE_BINARY_SENSOR
25 void set_motion(binary_sensor::BinarySensor *motion) { this->motion_ = motion; }
26 void set_motion_timeout(uint16_t timeout) { this->motion_timeout_ = timeout; }
27
28 void set_light(binary_sensor::BinarySensor *light) { this->light_ = light; }
29 void set_button(binary_sensor::BinarySensor *button) { this->button_ = button; }
30 void set_button_timeout(uint16_t timeout) { this->button_timeout_ = timeout; }
31#endif
32
33#ifdef USE_SENSOR
34 void set_battery_level(sensor::Sensor *battery_level) { battery_level_ = battery_level; }
35#endif
36
37 protected:
38 uint64_t address_;
39 uint8_t bindkey_[16];
40
41#ifdef USE_BINARY_SENSOR
44
48#endif
49#ifdef USE_SENSOR
51#endif
52};
53
54} // namespace esphome::xiaomi_rtcgq02lm
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 ble_device_base::ESPBTDevice &device) override
void set_battery_level(sensor::Sensor *battery_level)
void set_light(binary_sensor::BinarySensor *light)