ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
ina3221.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace ina3221 {
9
11 public:
12 void setup() override;
13 void dump_config() override;
14 void update() override;
15
16 void set_bus_voltage_sensor(int channel, sensor::Sensor *obj) { this->channels_[channel].bus_voltage_sensor_ = obj; }
17 void set_shunt_voltage_sensor(int channel, sensor::Sensor *obj) {
18 this->channels_[channel].shunt_voltage_sensor_ = obj;
19 }
20 void set_current_sensor(int channel, sensor::Sensor *obj) { this->channels_[channel].current_sensor_ = obj; }
21 void set_power_sensor(int channel, sensor::Sensor *obj) { this->channels_[channel].power_sensor_ = obj; }
22 void set_shunt_resistance(int channel, float resistance_ohm);
23
24 protected:
36};
37
38} // namespace ina3221
39} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:527
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:132
struct esphome::ina3221::INA3221Component::INA3221Channel channels_[3]
void set_bus_voltage_sensor(int channel, sensor::Sensor *obj)
Definition ina3221.h:16
void set_shunt_resistance(int channel, float resistance_ohm)
Definition ina3221.cpp:116
void set_shunt_voltage_sensor(int channel, sensor::Sensor *obj)
Definition ina3221.h:17
void set_current_sensor(int channel, sensor::Sensor *obj)
Definition ina3221.h:20
void set_power_sensor(int channel, sensor::Sensor *obj)
Definition ina3221.h:21
Base-class for all sensors.
Definition sensor.h:47
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7