ESPHome  2024.6.6
mics_4514.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include "esphome/core/hal.h"
7 
8 namespace esphome {
9 namespace mics_4514 {
10 
12  SUB_SENSOR(carbon_monoxide)
13  SUB_SENSOR(nitrogen_dioxide)
14  SUB_SENSOR(methane)
15  SUB_SENSOR(ethanol)
16  SUB_SENSOR(hydrogen)
17  SUB_SENSOR(ammonia)
18 
19  public:
20  void setup() override;
21  void dump_config() override;
22  float get_setup_priority() const override;
23  void update() override;
24 
25  protected:
26  bool warmed_up_{false};
27  bool initial_{true};
28 
29  float ox_calibration_{0};
30  float red_calibration_{0};
31 };
32 
33 } // namespace mics_4514
34 } // namespace esphome
This class simplifies creating components that periodically check a state.
Definition: component.h:283
virtual void setup()
Where the component's initialization should happen.
Definition: component.cpp:48
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133