fix render long numbers, #2267

This commit is contained in:
MichaelDvP
2024-12-03 12:39:30 +01:00
parent 473cf7c8af
commit 607f949638
5 changed files with 17 additions and 21 deletions

View File

@@ -267,10 +267,10 @@ void WebDataService::write_device_value(AsyncWebServerRequest * request, JsonVar
if (data.is<const char *>()) {
return_code = Command::call(device_type, cmd, data.as<const char *>(), true, id, output);
} else if (data.is<int>()) {
char s[10];
char s[20];
return_code = Command::call(device_type, cmd, Helpers::render_value(s, data.as<int32_t>(), 0), true, id, output);
} else if (data.is<float>()) {
char s[10];
char s[20];
return_code = Command::call(device_type, cmd, Helpers::render_value(s, data.as<float>(), 1), true, id, output);
} else if (data.is<bool>()) {
return_code = Command::call(device_type, cmd, data.as<bool>() ? "true" : "false", true, id, output);