Add application version to root node of data.json (#2240)

* Add version to root node of data.json

* Formatting

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
This commit is contained in:
Sab44
2026-02-27 14:27:45 +01:00
committed by GitHub
co-authored by PhyxionNL
parent e4566effd3
commit 8cc452c31a
@@ -30,6 +30,8 @@ public class HttpServer
private readonly HttpListener _listener;
private readonly Node _root;
private readonly IElement _rootElement;
private readonly Version _version = typeof(HttpServer).Assembly.GetName().Version;
private Task _listenerTask;
private CancellationTokenSource _cts;
@@ -523,6 +525,7 @@ public class HttpServer
int nodeIndex = 0;
json["id"] = nodeIndex++;
json["Version"] = $"{_version.Major}.{_version.Minor}.{_version.Build}";
json["Text"] = "Sensor";
json["Min"] = "Min";
json["Value"] = "Value";