MQTT configuration in yaml

Can someone please help me! I would like a sensor that
receives the information contained in the red circle.

Topic: warp3/2aZY/nfc/seen_tags

[{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0},{“tag_type”:0,“tag_id”:“”,“last_seen”:0}]

The data comes from a wallbox and is provided via MQTT. The double curved brackets are causing me problems, I have no idea how to select the right element!
Thank you

mqtt:
  sensor:
    - name: "Tag Identifier"
      state_topic: "warp3/2aZY/nfc/seen_tags"
      value_template: "{{ value_json[0].tag_id }}"
      unique_id: "abc123xyz456"

Great! Thank you very much!

1 Like

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.

Screenshots of code are generally frowned on, and often difficult to read. See How to help us help you - or How to ask a good question

If you copy it as text and post it in quote tags, then someone else can easily test possible solutions.

Ok. next time.

Why not edit your OP now? People asking the same question in the future would benefit.

1 Like