ESPHome  2022.6.2
ezo.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace ezo {
9 
11 class EZOSensor : public sensor::Sensor, public PollingComponent, public i2c::I2CDevice {
12  public:
13  void loop() override;
14  void dump_config() override;
15  void update() override;
16  float get_setup_priority() const override { return setup_priority::DATA; };
17 
18  void set_tempcomp_value(float temp);
19 
20  protected:
21  uint32_t start_time_ = 0;
22  uint32_t wait_time_ = 0;
23  uint16_t state_ = 0;
24  float tempcomp_;
25 };
26 
27 } // namespace ezo
28 } // namespace esphome
uint32_t wait_time_
Definition: ezo.h:22
void loop() override
Definition: ezo.cpp:34
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:18
This class simplifies creating components that periodically check a state.
Definition: component.h:266
This class implements support for the EZO circuits in i2c mode.
Definition: ezo.h:11
float get_setup_priority() const override
Definition: ezo.h:16
uint32_t start_time_
Definition: ezo.h:21
void set_tempcomp_value(float temp)
Definition: ezo.cpp:87
void update() override
Definition: ezo.cpp:22
uint16_t state_
Definition: ezo.h:23
Definition: a4988.cpp:4
void dump_config() override
Definition: ezo.cpp:14
Base-class for all sensors.
Definition: sensor.h:47