Hi, I am trying to use a NFC tag to trigger an automation. I have that working great but I want to now have a condition on my automation to only run if the tag_scanned event’s device_id is the device id of my phone.
I have tried a couple of things:
One is this sort of technique:
trigger:
platform: event
event_type: tag_scanned
condition:
# Test that we support this device and tag
- "{{ trigger.event.data.device_id == '123456789' }}"
and the other way is to have this in the triggers section:
platform: event
event_type: tag_scanned
event_data:
device_id: 123456789
In both cases the automation just runs regardless of what I set the device_id to.
Can anyone advise what I’m doing wrong?