ESPHome
2025.12.3
Loading...
Searching...
No Matches
esphome
components
ld2420
select
operating_mode_select.cpp
Go to the documentation of this file.
1
#include "
operating_mode_select.h
"
2
#include "
esphome/core/helpers.h
"
3
#include "
esphome/core/log.h
"
4
5
namespace
esphome::ld2420
{
6
7
static
const
char
*
const
TAG =
"ld2420.select"
;
8
9
void
LD2420Select::control
(
size_t
index) {
10
this->
publish_state
(index);
11
this->
parent_
->set_operating_mode(this->
option_at
(index));
12
}
13
14
}
// namespace esphome::ld2420
esphome::Parented< LD2420Component >::parent_
LD2420Component * parent_
Definition
helpers.h:943
esphome::ld2420::LD2420Select::control
void control(size_t index) override
Definition
operating_mode_select.cpp:9
esphome::select::Select::option_at
const char * option_at(size_t index) const
Return the option value at the provided index offset (as const char* from flash).
Definition
select.cpp:84
esphome::select::Select::publish_state
void publish_state(const std::string &state)
Definition
select.cpp:11
helpers.h
log.h
esphome::ld2420
Definition
ld2420_binary_sensor.cpp:5
operating_mode_select.h
Generated by
1.12.0