RESTful sensor count or retrieve Headers

Hi all,

I’m hoping that someone can help. I’m trying to use a RESTful sensor on an API, to get the total number of entries only (don’t care at this stage about the data in it).

Basically the endpoint provides a JSON list and I just want to know how many items in the top level of the list.
Is there a way to loop through these and count using this sensor?
Alternatively, the Header provides a “total” which gives me exactly what I want, can HA retrieve the headers?

Thanks!

value_template: "{{ value_json.some_list|count }}"
1 Like

Legend thank you!