Json listing of the selected row

Hi,
I have a url api from which I call json

  - platform: rest
    name: prayer_iotorc
    unique_id: iotorc
    resource: 'url api'
    value_template: '{{value_json.date}}'
    scan_interval: 3600
    json_attributes_path: "$[-1:]"
    json_attributes:
      - supply_point
      - cons
      - start_val
      - end_val
      - start_timestamp
      - end_timestamp

But in the output I have three different “supply_point”
and I need to modify it so that it always lists the last line of the selected supply_point
so I guess add something to value_template: ? supply_point==‘A’ is that possible?

Thanks
Mitch

No templates for attributes in rest
What you can do is read the whole json in a template sensor attribute and from there on use templating…bit difficult to be 100% sure if this helps … without data and a clear example

thanks
it seems that the solution is to list specific rows because I know which one contains what I need.

so I’ve modified it to

    value_template: '{{ value_json[17].supply_point }}'
    scan_interval: 900
    json_attributes_path: "$[17]"

and the value is printed.
I just need the values from three rows but I don’t know if I have the templates right?

Template:
  - sensors:
     cons1:
      value_template:"{{ state_attr('sensor.prayer_iotorc', 'cons') }}"           
     cons2:
      value_template:"{{ state_attr('sensor.iotorc_IMEL01T1', 'cons') }}"                 
     cons3:
      value_template:"{{ state_attr('sensor.iotorc_IMEL01T2', 'cons') }}"   

value from cons1 works but 2 and 3 don’t :frowning:

thanks to

no clue when you donot show the source data