ESPHome 2025.5.0
Loading...
Searching...
No Matches
scene_mode_select.cpp
Go to the documentation of this file.
1#include "scene_mode_select.h"
2
3namespace esphome {
4namespace seeed_mr24hpc1 {
5
6void SceneModeSelect::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_scene_mode(index.value());
11 }
12}
13
14} // namespace seeed_mr24hpc1
15} // namespace esphome
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
void publish_state(const std::string &state)
Definition select.cpp:9
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7