Hello, does anyone know a way to send te last tag scanned (the tag_id) into a template sensor?
I have been trying all sorts of ways, but i can’t seem to figure it out.
What i want to have is a template sensor that shows the last tag_id no matter what of the scanners was used to scan it.
i have tried this:
template:
- trigger:
- platform: event
event_type: tag_scanned
event_data:
tag_id:
- sensor:
- name: "LaatsteTag"
unique_id: edjfrejlkelmkerog
state: >
{{ trigger.event.data.tag_id }}
but that does’t seem to work. Each reader has a template sensor displaying the last read tag.
Any help would be apreciated!!