mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
19 lines
522 B
C++
19 lines
522 B
C++
#include "select_traits.h"
|
|
|
|
namespace esphome {
|
|
namespace select {
|
|
|
|
void SelectTraits::set_options(std::initializer_list<const char *> options) { this->options_ = options; }
|
|
|
|
void SelectTraits::set_options(const FixedVector<const char *> &options) {
|
|
this->options_.init(options.size());
|
|
for (size_t i = 0; i < options.size(); i++) {
|
|
this->options_[i] = options[i];
|
|
}
|
|
}
|
|
|
|
const FixedVector<const char *> &SelectTraits::get_options() const { return this->options_; }
|
|
|
|
} // namespace select
|
|
} // namespace esphome
|