Hello all,
i need your help again.
I am trying to create a sensor with the help of the rest command.
The Problem is, that the resonse is full of informations.
But lets start at the beginning.
I want to work with the following API:
https://www.autoaid.de/developers/api_docs/ (and some more is here: https://developers.autoaid.de/api_docs/)
I am able to get some informations like make/model etc
with this:
- platform: rest
resource: https://api-production.autoaid.de/cc/v0.1/status/vehicles/VINVNxxxxxx
name: Make_car_01
value_template: '{{ value_json.make }}'
json_attributes:
- make
headers:
Authorization: "xxxxxxxxxx"
content-language: "en_US"
- platform: template
sensors:
date:
friendly_name: 'Make'
value_template: '{{ states.sensor.json_make.attributes["make"] }}'
This is kind of easy (i still needed a lot time to understand this)
What i am looking for is the value of the fuel_level, which i get when i request
/status/vehicles/{vehicleId}
So, i am not sure how to get to this, as this is kind of within the response. The paramter “value” is mutiple times in this response as well.
I know i could work with a nested Json but i am not able to get this to work.
Hopefully you understand what i am trying to achive here.
Anyone here wo can help me ? Thanks a lot