Fixes float being cast as int
This commit is contained in:
parent
acfd967aee
commit
2cd551f7c5
4 changed files with 5 additions and 4 deletions
|
|
@ -89,7 +89,7 @@
|
|||
const data = await result.json();
|
||||
|
||||
TIMESTAMP_DISPLAY.textContent = new Date().toLocaleString();
|
||||
TEMP_DISPLAY.textContent = `${data.temperature.toLocaleString(undefined, { minimumFractionDigits: 2 })}°C`;
|
||||
TEMP_DISPLAY.textContent = `${data.temperature.toLocaleString(undefined, { minimumFractionDigits: 1 })}°C`;
|
||||
MOISTURE.textContent = `${data.moisture}%`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue