ESPHome  2024.12.2
xiaomi_wx08zm.h
Go to the documentation of this file.
1 #pragma once
2 
8 
9 #ifdef USE_ESP32
10 
11 namespace esphome {
12 namespace xiaomi_wx08zm {
13 
14 class XiaomiWX08ZM : public Component,
17  public:
18  void set_address(uint64_t address) { address_ = address; }
19 
20  bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override;
21 
22  void dump_config() override;
23  float get_setup_priority() const override { return setup_priority::DATA; }
24  void set_tablet(sensor::Sensor *tablet) { tablet_ = tablet; }
25  void set_battery_level(sensor::Sensor *battery_level) { battery_level_ = battery_level; }
26 
27  protected:
28  uint64_t address_;
31 };
32 
33 } // namespace xiaomi_wx08zm
34 } // namespace esphome
35 
36 #endif
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
float get_setup_priority() const override
Definition: xiaomi_wx08zm.h:23
void set_tablet(sensor::Sensor *tablet)
Definition: xiaomi_wx08zm.h:24
bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override
void set_address(uint64_t address)
Definition: xiaomi_wx08zm.h:18
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
uint8_t address
Definition: bl0906.h:211
Base-class for all sensors.
Definition: sensor.h:57
void set_battery_level(sensor::Sensor *battery_level)
Definition: xiaomi_wx08zm.h:25