I have an API response that looks like this:
[
{
"id": 1,
"name": "Clean Up Living Room",
},
{
"id": 3,
"name": "Restock Items",
}
]
I want to put the entire list into an attribute of a sensor, but since there is no key on this array, I’m not sure what to put as the value of json_attributes. Has anyone done something like this?
- resource: "myApiUrl"
scan_interval: 43200 #12h
timeout: 60
method: "GET"
sensor:
- name: "Chores"
value_template: "{{ value_json | length }}"
json_attributes:
- WhatGoesHere??