diff --git a/esphome/components/esphome/ota/ota_esphome.cpp b/esphome/components/esphome/ota/ota_esphome.cpp index e8626be9fb..045aa133d6 100644 --- a/esphome/components/esphome/ota/ota_esphome.cpp +++ b/esphome/components/esphome/ota/ota_esphome.cpp @@ -105,15 +105,15 @@ void ESPHomeOTAComponent::dump_config() { uint32_t running_app_offset; size_t running_app_size; ota::get_running_app_position(running_app_offset, running_app_size); - ESP_LOGCONFIG(TAG, " Running app:\n Partition address: 0x%X\n Used size: %d bytes", - running_app_offset, running_app_size); + ESP_LOGCONFIG(TAG, " Running app:\n Partition address: 0x%X\n Used size: %d bytes", running_app_offset, + running_app_size); #ifdef USE_ESP32 ESP_LOGCONFIG(TAG, " Partition table:"); esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL); while (it != NULL) { const esp_partition_t *p = esp_partition_get(it); - ESP_LOGCONFIG(TAG, " %s: type=0x%X, subtype=0x%X, address=0x%X, size=0x%X", - p->label, p->type, p->subtype, p->address, p->size); + ESP_LOGCONFIG(TAG, " %s: type=0x%X, subtype=0x%X, address=0x%X, size=0x%X", p->label, p->type, p->subtype, + p->address, p->size); it = esp_partition_next(it); } esp_partition_iterator_release(it); diff --git a/esphome/components/ota/ota_backend_esp_idf.cpp b/esphome/components/ota/ota_backend_esp_idf.cpp index 36a4741613..f5b8f14cfe 100644 --- a/esphome/components/ota/ota_backend_esp_idf.cpp +++ b/esphome/components/ota/ota_backend_esp_idf.cpp @@ -190,9 +190,9 @@ OTAResponseTypes IDFOTABackend::update_partition_table() { get_running_app_position(running_app_offset, running_app_size); // Get partition table partition - esp_err_t err = esp_partition_register_external(nullptr, ESP_PRIMARY_PARTITION_TABLE_OFFSET, ESP_PARTITION_TABLE_SIZE, - "PrimaryPrtTable", ESP_PARTITION_TYPE_PARTITION_TABLE, - ESP_PARTITION_SUBTYPE_PARTITION_TABLE_PRIMARY, &this->partition_table_part_); + esp_err_t err = esp_partition_register_external( + nullptr, ESP_PRIMARY_PARTITION_TABLE_OFFSET, ESP_PARTITION_TABLE_SIZE, "PrimaryPrtTable", + ESP_PARTITION_TYPE_PARTITION_TABLE, ESP_PARTITION_SUBTYPE_PARTITION_TABLE_PRIMARY, &this->partition_table_part_); if (err != ESP_OK) { ESP_LOGE(TAG, "esp_partition_register_external failed (err=0x%X) ", err); return OTA_RESPONSE_ERROR_PARTITION_TABLE_VERIFY; diff --git a/esphome/components/ota/ota_backend_esp_idf.h b/esphome/components/ota/ota_backend_esp_idf.h index b1c49c427a..6192f5f969 100644 --- a/esphome/components/ota/ota_backend_esp_idf.h +++ b/esphome/components/ota/ota_backend_esp_idf.h @@ -14,7 +14,7 @@ static constexpr size_t OTA_BUFFER_SIZE = ESP_PARTITION_TABLE_MAX_LEN; // 0xC00 #endif #ifdef USE_OTA_PARTITIONS - void get_running_app_position(uint32_t &offset, size_t &size); +void get_running_app_position(uint32_t &offset, size_t &size); #endif class IDFOTABackend final { diff --git a/esphome/espota2.py b/esphome/espota2.py index 8b5138789e..e8d27d69fa 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -210,9 +210,7 @@ def check_error(data: list[int] | bytes, expect: int | list[int] | None) -> None "the firmware currently running on the device." ) if dat == RESPONSE_ERROR_UNSUPPORTED_OTA_TYPE: - raise OTAError( - "Error: The requested OTA type is not supported by the device." - ) + raise OTAError("Error: The requested OTA type is not supported by the device.") if dat == RESPONSE_ERROR_PARTITION_TABLE_VERIFY: raise OTAError( "Error: The partition table update could not be verified. No changes were "