Hey i have a rest sensor that executes a .js file
the output is more then 255 chars, i am only interested in this line:
minValue: { rawValue: 0, value: 0, valueType: 'RELATIVE' },
or even better, only the “value” => 0
this is my rest sensor, but it doesnt work, help is appreciated
- platform: rest
resource: http://192.168.0.17:8123/local/test.js
name: Test
scan_interval: 500
value_template: '{{ value | regex_findall_index("minValue: { rawValue: 0, value:(\d+)", ignorecase=true) | int }}'
tom_l
2
Can you post the full output?
yes, if i do it from command line, this is complete output
{
id: 0,
api: 788,
apiText: 'GW_LIMITATION_STATUS_NTF',
sessionID: 1,
nodeID: 0,
parameterID: 0,
parameterTyp: undefined,
parameterText: undefined,
minValue: { rawValue: 0, value: 0, valueType: 'RELATIVE' },
maxValue: { rawValue: 63487, value: null, valueType: 'RELATIVE' },
limitationOriginator: 255,
limitationOriginatorTyp: 'EMERGENCY',
limitationOriginatorText: 'Used in context with emergency or security',
limitationTime: 255
}
@tom_l
Is there also a way to actually see the 255 max character string in some log file? I want to see if the command was successful in first case