wip item refactor

This commit is contained in:
Carl Philipp Klemm 2026-03-30 16:59:32 +02:00
parent 5cd7c782ce
commit 18cf2b01bd
6 changed files with 60 additions and 18 deletions

View file

@ -53,9 +53,11 @@ public:
type = static_cast<sensor_type_t>(json["SensorType"].toInt(0));
id = json["Id"].toInt(0);
field = json["Field"].toDouble(0);
name = json["Name"].toString("Sensor");
lastSeen = QDateTime::fromString(json["LastSeen"].toString(""));
hidden = json["Hidden"].toBool(false);
name = json["Name"].toString();
if(name == "")
generateName();
}
inline bool operator==(const Sensor& in) const
{