JSON String read out an configure to sensor

Hi @ All

I have a JSON-String with Topic “Jsn”

{“bat”:{“0”:3273,“1”:3273,“2”:3272,“3”:3273,“4”:3272,“5”:3277,“6”:3273,“7”:3274,“8”:3273,“9”:3274,“10”:3272,“11”:3272,“12”:3272,“13”:3272,“14”:3274,“15”:3273},“SOC”:63,“PWT”:-327,“PMV”:“52.35”,“PMA”:“-6.25”,“PDV”:5,“AMV”:3273,“TMP”:21,“ALM”:“0,0”,“ALMF”:0}

I want to extract

mqtt:
  sensor:
  
  - name: Status of Charge
    state_topic: "Jsn"
    unit_of_measurement: "%"
    value_template: "{{ value_json.SOC }}"

  - name: Average mVolts on Cells
    state_topic: "Jsn"
    unit_of_measurement: "mV"
    value_template: "{{ value_json.AMV }}"

  ... above rules



  ... from here no Results

  - name: Cell_0
    state_topic: "Jsn"
    unit_of_measurement: "mV"
    value_template: "{{ value_json.bat0 }}"

  - name: Cell_1
    state_topic: "Jsn"
    unit_of_measurement: "mV"
    value_template: "{{ value_json.bat1 }}"

# so on fot Cell_2 .. Cell15

The Values for Cell_0 to Cell_15 do not work - why? Please help :wink:

  - name: Cell_0
    state_topic: "Jsn"
    unit_of_measurement: "mV"
    value_template: "{{ value_json.bat.0 }}"

  - name: Cell_1
    state_topic: "Jsn"
    unit_of_measurement: "mV"
    value_template: "{{ value_json.bat.1 }}"