value shall be string

This commit is contained in:
Wolfgang Hottgenroth 2025-02-10 14:18:19 +01:00
parent 64dba890dd
commit 553648e10d

View File

@ -3,6 +3,7 @@ package tsmq
import (
"log"
"time"
"strconv"
"encoding/json"
"tsm/config"
@ -14,7 +15,7 @@ import (
type variable_t struct {
Label string `json:"label"`
Variable string `json:"variable"`
Value float64 `json:"value"`
Value string `json:"value"`
Unit string `json:"unit"`
Status string `json:"status"`
}
@ -51,7 +52,7 @@ func Start() {
v := variable_t {
Label: label,
Variable: "",
Value: value,
Value: strconv.FormatFloat(value, 'f', 4, 64)
Unit: "ms",
Status: status,
}