mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +00:00
tweak
This commit is contained in:
@@ -28,7 +28,7 @@ void ModbusSelect::parse_and_publish(const std::vector<uint8_t> &data) {
|
|||||||
|
|
||||||
if (map_it != this->mapping_.cend()) {
|
if (map_it != this->mapping_.cend()) {
|
||||||
size_t idx = std::distance(this->mapping_.cbegin(), map_it);
|
size_t idx = std::distance(this->mapping_.cbegin(), map_it);
|
||||||
new_state = this->traits.get_options()[idx];
|
new_state = std::string(this->traits.get_options()[idx]);
|
||||||
ESP_LOGV(TAG, "Found option %s for value %lld", new_state->c_str(), value);
|
ESP_LOGV(TAG, "Found option %s for value %lld", new_state->c_str(), value);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGE(TAG, "No option found for mapping %lld", value);
|
ESP_LOGE(TAG, "No option found for mapping %lld", value);
|
||||||
|
|||||||
Reference in New Issue
Block a user