ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
pylontech
text_sensor
pylontech_text_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../pylontech.h
"
4
#include "
esphome/components/text_sensor/text_sensor.h
"
5
6
namespace
esphome::pylontech
{
7
8
class
PylontechTextSensor
final :
public
PylontechListener
{
9
public
:
10
explicit
PylontechTextSensor
(uint8_t bat_num) :
PylontechListener
(bat_num) {}
11
void
dump_config
()
override
;
12
13
SUB_TEXT_SENSOR
(base_state)
14
SUB_TEXT_SENSOR
(voltage_state)
15
SUB_TEXT_SENSOR
(current_state)
16
SUB_TEXT_SENSOR
(temperature_state)
17
18
void
on_line_read
(
LineContents
*line)
override
;
19
};
20
21
}
// namespace esphome::pylontech
esphome::pylontech::PylontechListener
Definition
pylontech.h:24
esphome::pylontech::PylontechListener::on_line_read
virtual void on_line_read(LineContents *line)=0
Called only with records for this listener's battery.
esphome::pylontech::PylontechTextSensor
Definition
pylontech_text_sensor.h:8
esphome::pylontech::PylontechTextSensor::SUB_TEXT_SENSOR
SUB_TEXT_SENSOR(base_state) SUB_TEXT_SENSOR(voltage_state) SUB_TEXT_SENSOR(current_state) SUB_TEXT_SENSOR(temperature_state) void on_line_read(LineContents *line) override
esphome::pylontech::PylontechTextSensor::dump_config
void dump_config() override
Definition
pylontech_text_sensor.cpp:9
esphome::pylontech::PylontechTextSensor::PylontechTextSensor
PylontechTextSensor(uint8_t bat_num)
Definition
pylontech_text_sensor.h:10
esphome::pylontech
Definition
pylontech.cpp:39
pylontech.h
esphome::pylontech::PylontechListener::LineContents
Definition
pylontech.h:27
text_sensor.h
Generated by
1.12.0