ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
ld2410s_select.h
Go to the documentation of this file.
1#pragma once
2
4#if defined(USE_SELECT) && defined(USE_LD2410S_PARAMETERS)
5
6#include "ld2410s.h"
8
9namespace esphome::ld2410s {
10
11class LD2410SSelect final : public select::Select, public Parented<LD2410SComponent> {
12 protected:
13 void control(size_t index) override {
14 if (this->parent_->set_parameter(Parameter::PARAMETER_RESPONSE_SPEED, progmem_read_byte(&RESPONSE_SPEEDS[index])))
15 this->publish_state(index);
16 }
17};
18
19} // namespace esphome::ld2410s
20
21#endif // USE_SELECT && USE_LD2410S_PARAMETERS
Helper class to easily give an object a parent of type T.
Definition helpers.h:1997
void control(size_t index) override
Base-class for all selects.
Definition select.h:29
void publish_state(const std::string &state)
Definition select.h:36
uint8_t progmem_read_byte(const uint8_t *addr)
Definition hal.h:51