From 3c75e8e6766136b7adb4939fad55d952ca0ca452 Mon Sep 17 00:00:00 2001 From: Sab44 <64696149+Sab44@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:04:09 +0200 Subject: [PATCH] Add HardwareId property to hardware devices in data.json (#1868) * add HardwareId property to hardware in data.json * Rename 'id' key to 'Id' in JSON node generation --------- Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com> --- LibreHardwareMonitor/Utilities/HttpServer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LibreHardwareMonitor/Utilities/HttpServer.cs b/LibreHardwareMonitor/Utilities/HttpServer.cs index 91fe5b0..8788c64 100644 --- a/LibreHardwareMonitor/Utilities/HttpServer.cs +++ b/LibreHardwareMonitor/Utilities/HttpServer.cs @@ -625,7 +625,7 @@ public class HttpServer { JObject jsonNode = new() { - ["id"] = nodeIndex++, + ["Id"] = nodeIndex++, ["Text"] = n.Text, ["Min"] = string.Empty, ["Value"] = string.Empty, @@ -643,6 +643,7 @@ public class HttpServer jsonNode["ImageURL"] = "images/transparent.png"; break; case HardwareNode hardwareNode: + jsonNode["HardwareId"] = hardwareNode.Hardware.Identifier.ToString(); jsonNode["ImageURL"] = "images_icon/" + GetHardwareImageFile(hardwareNode); break; case TypeNode typeNode: