Hi Guys,
i have more than 20 log-reader devices, more then 15 ping-presense and more than 15 button devices in my config and all of them (for each type) have got nearly the same configuration. Is it possible to make this more practicable and let the config file be shorter? Something like using a placeholder and a array would be nice. Here is a short example what i mean:
{
"id": "<placeholder>-size-logfile",
"name": "Size",
"class": "LogWatcher",
"file": "/home/pi/pimatic-app/logs/<placeholder>-size.log",
"attributes": [
{
"name": "Größe",
"type": "number",
"unit": "MB"
},
{
"name": "Frei",
"type": "number",
"unit": "MB"
},
{
"name": "Prozent",
"type": "number",
"unit": "%"
}
],
"lines": [
{
"match": "total:(.+)",
"größe": "$1"
},
{
"match": "available:(.+)",
"frei": "$1"
},
{
"match": "prozent:(.+)",
"prozent": "$1"
}
]
},
This would save me a lot of my config file. Thanks !