mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +00:00
touch ups
This commit is contained in:
@@ -10,7 +10,6 @@ void TuyaSelect::setup() {
|
|||||||
this->parent_->register_listener(this->select_id_, [this](const TuyaDatapoint &datapoint) {
|
this->parent_->register_listener(this->select_id_, [this](const TuyaDatapoint &datapoint) {
|
||||||
uint8_t enum_value = datapoint.value_enum;
|
uint8_t enum_value = datapoint.value_enum;
|
||||||
ESP_LOGV(TAG, "MCU reported select %u value %u", this->select_id_, enum_value);
|
ESP_LOGV(TAG, "MCU reported select %u value %u", this->select_id_, enum_value);
|
||||||
const auto &options = this->traits.get_options();
|
|
||||||
auto mappings = this->mappings_;
|
auto mappings = this->mappings_;
|
||||||
auto it = std::find(mappings.cbegin(), mappings.cend(), enum_value);
|
auto it = std::find(mappings.cbegin(), mappings.cend(), enum_value);
|
||||||
if (it == mappings.end()) {
|
if (it == mappings.end()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user