Merge pull request #12121 from vvlladd28/bug/ruleno-help/tbel-roud

Fixed wrong example in TBEL round number
This commit is contained in:
Igor Kulikov 2024-11-29 17:53:31 +02:00 committed by GitHub
commit 7ab614b629
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,7 @@ All fields in resulting object are mandatory.
```javascript
var temperature = 18 + Math.random() * (32 - 18);
// Round to at most 2 decimal places (optional)
temperature = Math.round( temperature * 100 ) / 100;
temperature = toFixed(temperature, 2);
var msg = { temperature: temperature };
return { msg: msg, metadata: {}, msgType: "POST_TELEMETRY_REQUEST" };
{:copy-code}