Skip to content

Commit

Permalink
Fix Memory reading after identify callback
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Jan 26, 2025
1 parent de9aa7e commit 196445d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ namespace esphome
ESP_LOGD(TAG, "Identified Hardware: %s (version %i), Firmware: %i.%i.%i - %i",
hw_model, device.hardware_version, device.firmware_major, device.firmware_minor, device.firmware_patch, device.firmware_version);

this->identify_complete_callback_.call(device);

// Update Model
if(device.model != MODEL_NONE && device.model != this->model_) {
this->model_ = device.model;
Expand All @@ -251,6 +249,8 @@ namespace esphome
#endif
this->save_settings();
}

this->identify_complete_callback_.call(device);
} else {
ESP_LOGE(TAG, "Invalid indentification response!");
}
Expand Down

0 comments on commit 196445d

Please sign in to comment.