From f01aeded4d1af02ac8d16dea900b6245cf0111cd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 9 Jan 2026 16:36:17 -1000 Subject: [PATCH] tests update --- tests/components/midea/common.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/components/midea/common.yaml b/tests/components/midea/common.yaml index 957e9830c9..c7b18a6701 100644 --- a/tests/components/midea/common.yaml +++ b/tests/components/midea/common.yaml @@ -13,22 +13,22 @@ climate: on_state: - logger.log: State changed! - lambda: |- - // Test get_custom_fan_mode() returns std::string_view + // Test get_custom_fan_mode() returns StringRef if (id(midea_unit).has_custom_fan_mode()) { auto fan_mode = id(midea_unit).get_custom_fan_mode(); // Compare with string literal using == if (fan_mode == "SILENT") { ESP_LOGD("test", "Fan mode is SILENT"); } - // Log using %.*s format for string_view - ESP_LOGD("test", "Custom fan mode: %.*s", (int) fan_mode.size(), fan_mode.data()); + // Log using %.*s format for StringRef + ESP_LOGD("test", "Custom fan mode: %.*s", (int) fan_mode.size(), fan_mode.c_str()); } - // Test get_custom_preset() returns std::string_view + // Test get_custom_preset() returns StringRef if (id(midea_unit).has_custom_preset()) { auto preset = id(midea_unit).get_custom_preset(); // Check if empty if (!preset.empty()) { - ESP_LOGD("test", "Custom preset: %.*s", (int) preset.size(), preset.data()); + ESP_LOGD("test", "Custom preset: %.*s", (int) preset.size(), preset.c_str()); } } transmitter_id: xmitr