Are there built-in math functions that can be used in variable calculations (in basic logic flows, not Homeyscript)? If so, where can I find the docs?

# Available math functions

You can use the Logic-card â€śCalculate a numeric valueâ€ť in THEN field an set variables to calculated values from other variables or/and tags.

Iâ€™m sorry to say I donâ€™t know where you can find the docs.

*â€śYou can even perform math inside a Flow! Surround your formula with curly brackets, for example:
{{ 1 + 2 }}
Of course you can add tags in this calculation.â€ť*

This was what I was looking for but I fail to use it.

I tried this in a Simple Logic card:

`{{print('Foo $0', <Temperature>)}}`

where is one of the Tags I get the following on the timeline:

`{{print('Foo $0', 19.9)}}`

where 19.9 is the value of

What am I doing wrong?

What do you expect of the â€śprintâ€ť function?

I expected `Foo 19.9`

. I assumed it was like sprintf in C.

When I tried `{{ 10 + 20 }}`

it returned `30`

.

When I looked at the link https://mathjs.org/docs/reference/functions.html above I assumed all functioned were possible to use. Maybe it was wrong assumption.

Iâ€™m not sure, but I expect print means print to terminal, what not is possible at Homey

The `math.print()`

â€śvaluesâ€ť argument (the second one) is expected to be an object, an array or a matrix, not a scalar value.

Try this:

```
{{ print('Foo $0', [ <Temperature> ]) }}
```

When I enter your proposal I get the following:

`{{ print('Foo $0', [ 19.9 ])}}`

which is the same as I got earlier.

It seems like I fail with the print function. But I do realize how to solve my initial problem which was to create a string including a tag value in the middle. I wanted to create a json string, e.g. `{{ value : <Temperature> }}`

.

I thought I needed the print function for it nut it now works with what you just gave me above. Thanks!