Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: Big Mike <mikelawrence@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
25 lines
707 B
C++
25 lines
707 B
C++
#pragma once
|
|
|
|
#include "esphome/components/i2c/i2c.h"
|
|
#include "esphome/components/sensor/sensor.h"
|
|
#include "esphome/core/component.h"
|
|
|
|
namespace esphome::hdc2080 {
|
|
|
|
class HDC2080Component : public PollingComponent, public i2c::I2CDevice {
|
|
public:
|
|
void set_temperature(sensor::Sensor *temperature) { this->temperature_sensor_ = temperature; }
|
|
void set_humidity(sensor::Sensor *humidity) { this->humidity_sensor_ = humidity; }
|
|
|
|
/// Setup the sensor and check for connection.
|
|
void setup() override;
|
|
void dump_config() override;
|
|
void update() override;
|
|
|
|
protected:
|
|
sensor::Sensor *temperature_sensor_{nullptr};
|
|
sensor::Sensor *humidity_sensor_{nullptr};
|
|
};
|
|
|
|
} // namespace esphome::hdc2080
|