ESPHome  2024.11.1
max9611.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include "esphome/core/hal.h"
7 
8 namespace esphome {
9 namespace max9611 {
10 
20 };
21 
27  OUT_DATA_BYTE_MSB_ADRR = 0x04, // Unused Op-Amp
28  OUT_DATA_BYTE_LSB_ADRR = 0x05, // Unused Op-Amp
29  SET_DATA_BYTE_MSB_ADRR = 0x06, // Unused Op-Amp
30  SET_DATA_BYTE_LSB_ADRR = 0x07, // Unused Op-Amp
35 };
36 
38  public:
39  void setup() override;
40  void dump_config() override;
41  float get_setup_priority() const override { return setup_priority::DATA; }
42  void update() override;
47 
48  void set_current_resistor(float r) { current_resistor_ = r; }
50 
51  protected:
57  uint8_t register_map_[0x0C];
59 };
60 
61 } // namespace max9611
62 } // namespace esphome
void set_current_resistor(float r)
Definition: max9611.h:48
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
void set_watt_sensor(sensor::Sensor *ws)
Definition: max9611.h:45
float get_setup_priority() const override
Definition: max9611.h:41
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void set_current_sensor(sensor::Sensor *cs)
Definition: max9611.h:44
void set_temp_sensor(sensor::Sensor *ts)
Definition: max9611.h:46
MAX9611Multiplexer gain_
Definition: max9611.h:58
sensor::Sensor * voltage_sensor_
Definition: max9611.h:52
void set_voltage_sensor(sensor::Sensor *vs)
Definition: max9611.h:43
sensor::Sensor * watt_sensor_
Definition: max9611.h:54
sensor::Sensor * temperature_sensor_
Definition: max9611.h:55
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
sensor::Sensor * current_sensor_
Definition: max9611.h:53
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133
void set_gain(MAX9611Multiplexer g)
Definition: max9611.h:49