53 int32_t voltage_gain_calibration{0};
54 int32_t power_gain_calibration{0};
55 uint16_t phase_angle_calibration{0};
56 float forward_active_energy_total{0};
57 float reverse_active_energy_total{0};
62 volatile bool reset_done{
false};
63 bool reset_pending{
false};
80 void setup()
override;
84 void update()
override;
86 void dump_config()
override;
101 void calibrate_s10zp_reading_(uint16_t a_register, int16_t calibration);
102 void calibrate_s24zpse_reading_(uint16_t a_register, int32_t calibration);
109 template<
typename F>
void update_sensor_from_s24zp_register16_(
sensor::Sensor *
sensor, uint16_t a_register, F &&f);
110 template<
typename F>
void update_sensor_from_s16_register16_(
sensor::Sensor *sensor, uint16_t a_register, F &&f);
111 template<
typename F>
void update_sensor_from_s32_register16_(
sensor::Sensor *sensor, uint16_t a_register, F &&f);
113 void reset_device_();
115 uint8_t read_u8_register16_(uint16_t a_register);
116 int16_t read_s16_register16_(uint16_t a_register);
117 uint16_t read_u16_register16_(uint16_t a_register);
118 int32_t read_s24zp_register16_(uint16_t a_register);
119 int32_t read_s32_register16_(uint16_t a_register);
120 uint32_t read_u32_register16_(uint16_t a_register);
122 void write_u8_register16_(uint16_t a_register, uint8_t value);
123 void write_s10zp_register16_(uint16_t a_register, int16_t value);
124 void write_u16_register16_(uint16_t a_register, uint16_t value);
125 void write_s24zpse_register16_(uint16_t a_register, int32_t value);
126 void write_s32_register16_(uint16_t a_register, int32_t value);
127 void write_u32_register16_(uint16_t a_register, uint32_t value);
ISRInternalGPIOPin irq1_pin
const float DATA
For components that import data from directly connected sensors like DHT.
float get_setup_priority() const override
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
void set_power_gain_calibration(int32_t val)
void set_channel_a(PowerChannel *channel)
void set_reset_pin(InternalGPIOPin *pin)
void set_channel_n(NeutralChannel *channel)
This class simplifies creating components that periodically check a state.
void set_current(sensor::Sensor *sens)
void set_voltage_gain_calibration(int32_t val)
void set_voltage(sensor::Sensor *sens)
void set_current_gain_calibration(int32_t val)
void set_channel_b(PowerChannel *channel)
void set_irq1_pin(InternalGPIOPin *pin)
void set_reverse_active_energy(sensor::Sensor *sens)
int32_t current_gain_calibration
void set_current_gain_calibration(int32_t val)
void set_power_factor(sensor::Sensor *sens)
void set_apparent_power(sensor::Sensor *sens)
void set_active_power(sensor::Sensor *sens)
void set_channel_c(PowerChannel *channel)
void set_frequency(float frequency)
void set_irq0_pin(InternalGPIOPin *pin)
Implementation of SPI Controller mode.
Base-class for all sensors.
void set_phase_angle_calibration(int32_t val)
void set_forward_active_energy(sensor::Sensor *sens)
void set_current(sensor::Sensor *sens)
This Class provides the methods to read/write bytes from/to an i2c device.
esphome::sensor::Sensor * sensor