Extract MQTT Json payload values that're in square brackets

rssi and snr are keys in a dictionary. The dictionary itself is the zeroth item of a list in the rxInfo key. So you need to indicate you want the zeroth item of rxInfo

mqtt:
  sensor:
    - name: "ABXY"
      unique_id: 4
      state_topic: "event/sample"
      value_template: "{{ value_json.object.RO1_status}}"
      json_attributes_topic: "event/sample"
      json_attributes_template: >
         { "Time": "{{value_json.time}}",
           "RSSI": {{value_json.rxInfo[0].rssi}},
           "SNR": {{value_json.rxInfo[0].snr}} }
1 Like