ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
ld2420
text_sensor
ld2420_text_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../ld2420.h
"
4
#include "
esphome/components/text_sensor/text_sensor.h
"
5
6
namespace
esphome::ld2420
{
7
8
class
LD2420TextSensor
final :
public
LD2420Listener
,
public
Component
,
public
text_sensor::TextSensor
{
9
public
:
10
void
dump_config
()
override
;
11
SUB_TEXT_SENSOR
(fw_version)
12
void
on_fw_version
(
const
char
*fw)
override
{ PUBLISH_STATE(this->fw_version_text_sensor_, fw); }
13
};
14
15
}
// namespace esphome::ld2420
esphome::Component
Definition
component.h:147
esphome::ld2420::LD2420Listener
Definition
ld2420.h:40
esphome::ld2420::LD2420Listener::on_fw_version
virtual void on_fw_version(const char *fw)
Definition
ld2420.h:44
esphome::ld2420::LD2420TextSensor
Definition
ld2420_text_sensor.h:8
esphome::ld2420::LD2420TextSensor::dump_config
void dump_config() override
Definition
ld2420_text_sensor.cpp:9
esphome::ld2420::LD2420TextSensor::SUB_TEXT_SENSOR
SUB_TEXT_SENSOR(fw_version) void on_fw_version(const char *fw) override
Definition
ld2420_text_sensor.h:11
esphome::text_sensor::TextSensor
Definition
text_sensor.h:29
ld2420.h
esphome::ld2420
Definition
ld2420_binary_sensor.cpp:5
text_sensor.h
Generated by
1.12.0