mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 22:26:36 +00:00
give bot hint
This commit is contained in:
parent
0534d1bfcf
commit
2088deeacb
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user