feat: sensor filter option

Filter out sensors based on regex matches.
This allows removing all unit text suffixes if, for example, the panel
image already contains the unit text.
This commit is contained in:
Markus Zehnder
2025-09-16 23:35:41 +02:00
parent 1e2616848a
commit 9af5deb204
7 changed files with 196 additions and 9 deletions
+21
View File
@@ -53,3 +53,24 @@ Usage example:
```shell
asterctl --config monitor.json --sensor-mapping sensor-mapping/sysinfo-to-aoostar.cfg
```
### Sensor Filter
Sensor entries in the text file can be filtered by regular expressions defined in the sensor filter file having the
same name as the sensor identifier mapping file, but with the `-filter` suffix in the file name.
Example:
- Sensor identifier mapping file: `sensor-mapping/sysinfo-to-aoostar.cfg`
- Sensor filter file: `sensor-mapping/sysinfo-to-aoostar-filter.cfg`
The filter file is a simple text file with one regular expression per line:
Example:
```
# remove all temperature sensor units
temperature_.*#unit
```
This removes all sensors starting with `temperature_` and ending with `#unit`, which will make sure that all the
temperature sensors will be rendered without the unit text suffix on the display panel.