ESPHome
2026.5.0
Loading...
Searching...
No Matches
esphome
components
sml
text_sensor
sml_text_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/sml/sml.h
"
4
#include "
esphome/components/text_sensor/text_sensor.h
"
5
#include "
../constants.h
"
6
7
namespace
esphome::sml
{
8
9
class
SmlTextSensor
:
public
SmlListener
,
public
text_sensor::TextSensor
,
public
Component
{
10
public
:
11
SmlTextSensor
(std::string
server_id
, std::string
obis_code
,
SmlType
format
);
12
void
publish_val
(
const
ObisInfo
&obis_info)
override
;
13
void
dump_config
()
override
;
14
15
protected
:
16
SmlType
format_
;
17
};
18
19
}
// namespace esphome::sml
esphome::Component
Definition
component.h:145
esphome::sml::ObisInfo
Definition
sml_parser.h:50
esphome::sml::SmlListener
Definition
sml.h:12
esphome::sml::SmlListener::server_id
std::string server_id
Definition
sml.h:14
esphome::sml::SmlListener::obis_code
std::string obis_code
Definition
sml.h:15
esphome::sml::SmlTextSensor
Definition
sml_text_sensor.h:9
esphome::sml::SmlTextSensor::SmlTextSensor
SmlTextSensor(std::string server_id, std::string obis_code, SmlType format)
Definition
sml_text_sensor.cpp:11
esphome::sml::SmlTextSensor::publish_val
void publish_val(const ObisInfo &obis_info) override
Definition
sml_text_sensor.cpp:14
esphome::sml::SmlTextSensor::dump_config
void dump_config() override
Definition
sml_text_sensor.cpp:54
esphome::sml::SmlTextSensor::format_
SmlType format_
Definition
sml_text_sensor.h:16
esphome::text_sensor::TextSensor
Definition
text_sensor.h:28
esphome::sml
Definition
constants.h:6
esphome::sml::SmlType
SmlType
Definition
constants.h:8
esphome::format
const char int const __FlashStringHelper * format
Definition
log.h:74
constants.h
sml.h
text_sensor.h
Generated by
1.12.0