ESPHome
2024.10.2
esphome
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
{
8
namespace
sml {
9
10
class
SmlTextSensor
:
public
SmlListener
,
public
text_sensor::TextSensor
,
public
Component
{
11
public
:
12
SmlTextSensor
(std::string
server_id
, std::string
obis_code
,
SmlType
format);
13
void
publish_val
(
const
ObisInfo
&obis_info)
override
;
14
void
dump_config
()
override
;
15
16
protected
:
17
SmlType
format_
;
18
};
19
20
}
// namespace sml
21
}
// namespace esphome
esphome::sml::SmlTextSensor::SmlTextSensor
SmlTextSensor(std::string server_id, std::string obis_code, SmlType format)
Definition:
sml_text_sensor.cpp:11
esphome::Component
Definition:
component.h:68
sml.h
esphome::sml::SmlType
SmlType
Definition:
constants.h:8
esphome::sml::SmlTextSensor::format_
SmlType format_
Definition:
sml_text_sensor.h:17
esphome::sml::SmlListener
Definition:
sml.h:13
esphome::sml::SmlTextSensor
Definition:
sml_text_sensor.h:10
esphome::sml::SmlListener::server_id
std::string server_id
Definition:
sml.h:15
esphome::text_sensor::TextSensor
Definition:
text_sensor.h:34
esphome::sml::ObisInfo
Definition:
sml_parser.h:21
esphome::sml::SmlListener::obis_code
std::string obis_code
Definition:
sml.h:16
esphome::sml::SmlTextSensor::publish_val
void publish_val(const ObisInfo &obis_info) override
Definition:
sml_text_sensor.cpp:14
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
esphome::sml::SmlTextSensor::dump_config
void dump_config() override
Definition:
sml_text_sensor.cpp:45
text_sensor.h
Generated by
1.8.13