Number To Fixed
This block formats a number as a string with a fixed number of decimals.
Configuration
- Input Number: the number to format.
- Decimal Places: number of digits after the decimal point. Default
2.
Connections
- Result: executed after formatting. The formatted text is available to the following blocks as
result_str.
The value is rounded to the nearest value, so 3.14159 with 2 decimal places becomes 3.14. Unlike Number Round Decimal Points, the requested number of decimals is always present in the output, so 3 with 2 decimal places becomes 3.00.
Use this block to format readings before showing them on the LCD or publishing them over MQTT.