ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::pylontech::PylontechSensor Class Referencefinal

#include <pylontech_sensor.h>

Inheritance diagram for esphome::pylontech::PylontechSensor:
esphome::pylontech::PylontechListener

Data Structures

struct  CellSensors
 

Public Member Functions

 PylontechSensor (uint8_t bat_num)
 
void dump_config () override
 
 SUB_SENSOR (voltage) SUB_SENSOR(current) SUB_SENSOR(temperature) SUB_SENSOR(temperature_low) SUB_SENSOR(temperature_high) SUB_SENSOR(voltage_low) SUB_SENSOR(voltage_high) SUB_SENSOR(coulomb) SUB_SENSOR(mos_temperature) void on_line_read(LineContents *line) override
 
void add_cell (uint8_t cell, sensor::Sensor *voltage, sensor::Sensor *temperature)
 
void on_cells_read (const CellArray &cells, cell_mask_t read) override
 
- Public Member Functions inherited from esphome::pylontech::PylontechListener
 PylontechListener (uint8_t bat_num)
 
uint8_t get_battery () const
 
virtual void on_line_read (LineContents *line)=0
 Called only with records for this listener's battery.
 

Protected Attributes

StaticVector< CellSensors, PYLONTECH_SENSOR_CELL_COUNT > cells_
 
- Protected Attributes inherited from esphome::pylontech::PylontechListener
uint8_t bat_num_
 

Additional Inherited Members

- Public Types inherited from esphome::pylontech::PylontechListener
using CellArray = std::array<CellContents, MAX_CELLS>
 

Detailed Description

Definition at line 8 of file pylontech_sensor.h.

Constructor & Destructor Documentation

◆ PylontechSensor()

esphome::pylontech::PylontechSensor::PylontechSensor ( uint8_t bat_num)
inlineexplicit

Definition at line 10 of file pylontech_sensor.h.

Member Function Documentation

◆ add_cell()

void esphome::pylontech::PylontechSensor::add_cell ( uint8_t cell,
sensor::Sensor * voltage,
sensor::Sensor * temperature )
inline

Definition at line 26 of file pylontech_sensor.h.

◆ dump_config()

void esphome::pylontech::PylontechSensor::dump_config ( )
overridevirtual

Implements esphome::pylontech::PylontechListener.

Definition at line 9 of file pylontech_sensor.cpp.

◆ on_cells_read()

void esphome::pylontech::PylontechSensor::on_cells_read ( const CellArray & cells,
cell_mask_t read )
overridevirtual

Reimplemented from esphome::pylontech::PylontechListener.

Definition at line 63 of file pylontech_sensor.cpp.

◆ SUB_SENSOR()

esphome::pylontech::PylontechSensor::SUB_SENSOR ( voltage )
override

Field Documentation

◆ cells_

StaticVector<CellSensors, PYLONTECH_SENSOR_CELL_COUNT> esphome::pylontech::PylontechSensor::cells_
protected

Definition at line 37 of file pylontech_sensor.h.


The documentation for this class was generated from the following files: