Here the example data.
Because the resultset is very long and I’m only interested in two numbers, I don’t want to call the uri two times and I would like to avoid to store the whole states object.
The data I’m interested in:
- data / vaccinated
- data / states / NW / vaccinated
Here is my starting point:
- platform: rest
name: RKI-Covid-Vaccinated
resource: https://api.corona-zahlen.org/vaccinations
json_attributes_path: "$.data"
json_attributes:
- vaccinated
- states
value_template: "OK" # To allow more than 255 characters return value
- platform: template
sensors:
rki_covid_nrw_vaccinated:
value_template: '{{ states.sensor.rki_covid_vaccinated.attributes.states.NW.vaccinated}}'
How would I avoid to store the huge sensor.rki_covid_vaccinated
object?
Is there a way to have a json_attributes
selector to get sub objects like states/NW?