The API endpoint: http://192.168.1.2:61208/api/3/gpu
Returns:
[
{
"key": "gpu_id",
"gpu_id": 0,
"name": "GeForce GTX 1050 Ti",
"mem": 4.415225982666016,
"proc": 3,
"temperature": 41
}
]
I’ve been using 3 separate REST calls (below) to grab the respective information. I was wondering how I can do this more efficiently with just one call.
- platform: rest
resource: http://192.168.1.2:61208/api/3/gpu
name: GPU Processor
value_template: '{{ value_json[0].proc }}'
unit_of_measurement: "%"
scan_interval: 5
- platform: rest
resource: http://192.168.1.2:61208/api/3/gpu
name: GPU Memory
value_template: '{{ value_json[0].mem| round(2) }}'
unit_of_measurement: "%"
scan_interval: 5
- platform: rest
resource: http://192.168.1.2:61208/api/3/gpu
name: GPU Temperature
value_template: '{{ value_json[0].temperature }}'
unit_of_measurement: "°C"
scan_interval: 5
Thanks in advance