ESPHome  2024.11.1
xiaomi_gcls002.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #ifdef USE_ESP32
9 
10 namespace esphome {
11 namespace xiaomi_gcls002 {
12 
14  public:
15  void set_address(uint64_t address) { address_ = address; }
16 
17  bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override;
18 
19  void dump_config() override;
20  float get_setup_priority() const override { return setup_priority::DATA; }
22  void set_moisture(sensor::Sensor *moisture) { moisture_ = moisture; }
23  void set_conductivity(sensor::Sensor *conductivity) { conductivity_ = conductivity; }
24  void set_illuminance(sensor::Sensor *illuminance) { illuminance_ = illuminance; }
25 
26  protected:
27  uint64_t address_;
32 };
33 
34 } // namespace xiaomi_gcls002
35 } // namespace esphome
36 
37 #endif
float get_setup_priority() const override
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override
void set_moisture(sensor::Sensor *moisture)
void set_illuminance(sensor::Sensor *illuminance)
void set_conductivity(sensor::Sensor *conductivity)
uint16_t temperature
Definition: sun_gtil2.cpp:26
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
uint8_t address
Definition: bl0906.h:211
void set_temperature(sensor::Sensor *temperature)
Base-class for all sensors.
Definition: sensor.h:57