ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
ee895.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::ee895 {
8
10class EE895Component final : public PollingComponent, public i2c::I2CDevice {
11 SUB_SENSOR(co2)
12 SUB_SENSOR(temperature)
13 SUB_SENSOR(pressure)
14
15 public:
16 void setup() override;
17 void dump_config() override;
18 void update() override;
19
20 protected:
21 void write_command_(uint16_t addr, uint16_t reg_cnt);
22 float read_float_();
23 uint16_t calc_crc16_(const uint8_t buf[], uint8_t len);
24};
25
26} // namespace esphome::ee895
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
This class implements support for the ee895 of temperature i2c sensors.
Definition ee895.h:10
void write_command_(uint16_t addr, uint16_t reg_cnt)
Definition ee895.cpp:63
uint16_t calc_crc16_(const uint8_t buf[], uint8_t len)
Definition ee895.cpp:92
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
const void size_t len
Definition hal.h:68
uint16_t temperature
Definition sun_gtil2.cpp:12
uint8_t pressure
Definition tt21100.cpp:7