[api] Fix string lifetime issue in Home Assistant service calls with templated values (#9909)

This commit is contained in:
J. Nick Koston
2025-07-28 16:39:25 +12:00
committed by GitHub
parent 05f6d01cbe
commit 1702356fc8
12 changed files with 670 additions and 25 deletions
+2 -2
View File
@@ -175,7 +175,7 @@ class CustomAPIDevice {
resp.data.emplace_back();
auto &kv = resp.data.back();
kv.set_key(StringRef(it.first));
kv.set_value(StringRef(it.second));
kv.value = it.second;
}
global_api_server->send_homeassistant_service_call(resp);
}
@@ -218,7 +218,7 @@ class CustomAPIDevice {
resp.data.emplace_back();
auto &kv = resp.data.back();
kv.set_key(StringRef(it.first));
kv.set_value(StringRef(it.second));
kv.value = it.second;
}
global_api_server->send_homeassistant_service_call(resp);
}