[tests] Fix clang-tidy warnings in custom_api_device_component fixture (#12390)

This commit is contained in:
J. Nick Koston
2025-12-10 00:50:26 +01:00
committed by GitHub
parent 3a6edbc2c7
commit 3642399460
2 changed files with 2 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ void CustomAPIDeviceComponent::on_service_with_arrays(std::vector<bool> bool_arr
} }
} }
// NOLINTNEXTLINE(performance-unnecessary-value-param)
void CustomAPIDeviceComponent::on_ha_state_changed(std::string entity_id, std::string state) { void CustomAPIDeviceComponent::on_ha_state_changed(std::string entity_id, std::string state) {
ESP_LOGI(TAG, "Home Assistant state changed for %s: %s", entity_id.c_str(), state.c_str()); ESP_LOGI(TAG, "Home Assistant state changed for %s: %s", entity_id.c_str(), state.c_str());
ESP_LOGI(TAG, "This subscription uses std::string API for backward compatibility"); ESP_LOGI(TAG, "This subscription uses std::string API for backward compatibility");

View File

@@ -24,6 +24,7 @@ class CustomAPIDeviceComponent : public Component, public CustomAPIDevice {
std::vector<float> float_array, std::vector<std::string> string_array); std::vector<float> float_array, std::vector<std::string> string_array);
// Test Home Assistant state subscription with std::string API // Test Home Assistant state subscription with std::string API
// NOLINTNEXTLINE(performance-unnecessary-value-param)
void on_ha_state_changed(std::string entity_id, std::string state); void on_ha_state_changed(std::string entity_id, std::string state);
}; };