I use this rest template to get that json where I want tog the last data value 10.596140653435064
I tried with value_template: "{{ json_value.results.A.frames[0].data.values[1][0] }}"
and i get empty result.
After testing it, I get the json_value.results.A.frames[0].data.values
with the correct array as it’s value but I cannot get one of the values of the double array.
I tested it with jsonpathonline and the HA template developer tools and it works great retriving the value number. It only fails with the restful sensor which is a POST
{
"results":{
"A":{
"status":200,
"frames":[
{
"schema":{
"refId":"A",
"meta":{
"type":"numeric-multi",
"typeVersion":[
0,
1
],
"custom":{
"resultType":"vector"
},
"executedQueryString":"Expr: sum((rate(container_cpu_user_seconds_total{image!=\"\", instance=\"cadvisor:8080\"}[5m]) / on(instance) group_left() machine_cpu_cores) * 100)\nStep: 15s"
},
"fields":[
{
"name":"Time",
"type":"time",
"typeInfo":{
"frame":"time.Time"
},
"config":{
"interval":15000
}
},
{
"name":"Value",
"type":"number",
"typeInfo":{
"frame":"float64"
},
"labels":{
},
"config":{
"displayNameFromDS":"sum((rate(container_cpu_user_seconds_total{image!=\"\", instance=\"cadvisor:8080\"}[5m]) / on(instance) group_left() machine_cpu_cores) * 100)"
}
}
]
},
"data":{
"values":[
[
1726588791336
],
[
10.596140653435064
]
]
}
}
]
}
}
}