refactor: sensor configuration fields

Automatically round decimal values for sensor.x and .y to an integer.
Make fields optional which are not used in every sensor.
This commit is contained in:
Markus Zehnder
2025-08-24 21:18:56 +02:00
parent 98941a00fe
commit 84455e9254
6 changed files with 50 additions and 62 deletions
-5
View File
@@ -31,7 +31,6 @@ Example `panel.json` with a single "fan" indicator sensor and the following (par
"id": "29d9ef2d-30b4-459d-b2b0-43cb6d4d6b41",
"itemName": "CPU usage",
"mode": 2,
"type": 1,
"direction": 1,
"label": "cpu_percent",
"value": "47.7",
@@ -39,10 +38,6 @@ Example `panel.json` with a single "fan" indicator sensor and the following (par
"y": 184,
"width": 237,
"height": 237,
"fontColor": "#ffffff",
"fontSize": 14,
"fontFamily": "default_font",
"textAlign": "left",
"minAngle": -160,
"maxAngle": 30,
"minValue": 0,