1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 15:12:21 +01:00

give bot hint

This commit is contained in:
J. Nick Koston
2025-07-21 22:10:26 -10:00
parent 0534d1bfcf
commit 2088deeacb

View File

@@ -98,6 +98,7 @@ void HomeassistantNumber::control(float value) {
resp.data.emplace_back();
auto &entity_value = resp.data.back();
entity_value.set_key(VALUE_KEY);
// to_string() returns a temporary - must store it to avoid dangling reference
std::string value_str = to_string(value);
entity_value.set_value(StringRef(value_str));