ESPHome  2024.10.2
t6615.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 namespace esphome {
9 namespace t6615 {
10 
11 enum class T6615Command : uint8_t {
12  NONE = 0,
13  GET_PPM,
14  GET_SERIAL,
17  GET_ABC,
18  ENABLE_ABC,
21 };
22 
24  public:
25  float get_setup_priority() const override;
26 
27  void loop() override;
28  void update() override;
29  void dump_config() override;
30 
31  void set_co2_sensor(sensor::Sensor *co2_sensor) { this->co2_sensor_ = co2_sensor; }
32 
33  protected:
34  void query_ppm_();
35  void send_ppm_command_();
36 
38  uint32_t command_time_ = 0;
39 
40  sensor::Sensor *co2_sensor_{nullptr};
41 };
42 
43 } // namespace t6615
44 } // namespace esphome
void loop()
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void set_co2_sensor(sensor::Sensor *co2_sensor)
Definition: t6615.h:31
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57