ESPHome  2024.10.2
motion_boundary_select.cpp
Go to the documentation of this file.
2 
3 namespace esphome {
4 namespace seeed_mr24hpc1 {
5 
6 void MotionBoundarySelect::control(const std::string &value) {
7  this->publish_state(value);
8  auto index = this->index_of(value);
9  if (index.has_value()) {
10  this->parent_->set_motion_boundary(index.value());
11  }
12 }
13 
14 } // namespace seeed_mr24hpc1
15 } // namespace esphome
void publish_state(const std::string &state)
Definition: select.cpp:9
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void control(const std::string &value) override
optional< size_t > index_of(const std::string &option) const
Find the (optional) index offset of the provided option value.
Definition: select.cpp:35