I’ve been trying for a while but can’t get this right and I think it’s a “limitation” in the pimatic core code.
I have this ShellSensor that will
{
"id": "pimatic-version",
"name": "pimatic version",
"class": "ShellSensor",
"attributeName": "version",
"attributeType": "number",
"command": "check-pimatic-version"
},
and this script pimatic-version
cat /usr/local/node_modules/pimatic/package.json |grep version\": |awk {'print $2'}|sed 's/,//g' |sed 's/"//g' > /tmp/pimatic-version
when I run it from the shell I get the expected 0.8.52
in /tmp/pimatic-version when writing these lines. but in pimatic it returns