From 45676b33844fd66452215f930b0b6956b4dc7d84 Mon Sep 17 00:00:00 2001 From: Carl Philipp Klemm Date: Wed, 6 May 2026 11:45:22 +0200 Subject: [PATCH] Fix sensor id truncation on serialization --- src/sensors/sensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sensors/sensor.h b/src/sensors/sensor.h index 8417ca5..012cb4b 100644 --- a/src/sensors/sensor.h +++ b/src/sensors/sensor.h @@ -61,7 +61,7 @@ public: Sensor(const QJsonObject& json) { type = static_cast(json["SensorType"].toInt(0)); - id = json["Id"].toInt(0); + id = json["Id"].toInteger(0); field = json["Field"].toDouble(0); lastSeen = QDateTime::fromString(json["LastSeen"].toString("")); hidden = json["Hidden"].toBool(false); @@ -110,7 +110,7 @@ public: { json["Type"] = "Sensor"; json["SensorType"] = static_cast(type); - json["Id"] = static_cast(id); + json["Id"] = static_cast(id); json["Field"] = field; json["Name"] = name; json["GroupName"] = groupName;