Comment by vitus
1 year ago
I was surprised that you opted to use the tag ID as a primary key instead of writing the relevant metadata to the NFC tags in the first place. NTAG215s have about 500 bytes worth of rewritable storage, so you could even embed the full deep links if you so desired.
https://www.shopnfc.com/en/content/6-nfc-tags-specs
It also seems that ESPHome has support for reading / writing this arbitrary metadata, once you move to the PN532:
https://esphome.io/components/binary_sensor/pn532.html#ndef
(It's not clear that you can access the metadata with the RC522 through ESPHome, but the hardware should support it.)
But hey, what you've got works.
Home Assistant scans the tag-IDs by default, so you use them as a trigger, with little extra effort for each new card. "When card with ID X is detected, do Y".
I have something similar setup in my home office for my music and I just use the ID, no need to complicate it any more than it already is.