ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
npi19.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::npi19 {
8
10class NPI19Component final : public PollingComponent, public i2c::I2CDevice {
11 SUB_SENSOR(temperature)
12 SUB_SENSOR(raw_pressure)
13
14 public:
15 void setup() override;
16 void dump_config() override;
17 void update() override;
18
19 protected:
20 i2c::ErrorCode read_(uint16_t &raw_temperature, uint16_t &raw_pressure);
21};
22
23} // namespace esphome::npi19
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 provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
This class implements support for the npi19 pressure and temperature i2c sensors.
Definition npi19.h:10
i2c::ErrorCode read_(uint16_t &raw_temperature, uint16_t &raw_pressure)
Definition npi19.cpp:31
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
Definition i2c_bus.h:13
uint16_t temperature
Definition sun_gtil2.cpp:12