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
123
(Taras)
June 9, 2024, 2:36pm
2
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
123
(Taras)
June 9, 2024, 3:26pm
4
michael.emminger:
Thank you very much!
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 .
stevemann
(Stephen Mann (YAML-challenged))
June 9, 2024, 3:31pm
5
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.
stevemann
(Stephen Mann (YAML-challenged))
June 9, 2024, 4:09pm
7
Why not edit your OP now? People asking the same question in the future would benefit.
2 Likes