Hi all.
About the format()
funtion. It looks like it isn’t supported?
I’m no coder, so be warned
Maybe Robert knows what I’m doing wrong here?
I want a number to be formatted as n.0 (always display the zero) and found this at math.js:
math.format(2.3, {notation: 'fixed', precision: 4}) // returns '2.3000'
(In case of notation ‘fixed’, precision
defines the number of significant digits after the decimal point)
So, with this Logics card ‘calc a value’, I want to accomplish 100 to be shown as 100.0 like this, but I get NaN values returned.
{{format(100, { notation: 'fixed', precision: 1 })}}
{{format(100, { 'fixed', precision: 1 })}}
{{format(100, { fixed, precision: 1 })}}
{{format(100, { precision: 1 })}}
{{format(100, { 1 })}}
Something else:
This should round to 1000, but it also returns NaN:
{{format(1234, 2)}}
Background of what I’d like to accomplish:
 Vars used:


<W3_Luchtdruk/10>
 a Logics NumericVar


<Druk>
 a value between 0 and 2000 form a airpressure sensor
VirtualDevice type Thermostat  should display 100.5 or 100.0 as airpressure
Calculate <W3_Luchtdruk/10>
as
{{format(<Druk>/10, { notation: 'fixed', precision: 1 })}}
Flow: