Hey! Looking for some help, tips, or just to get pointed in the right direction.
TL:DR: How can I map the random character “device_id’” of an EPSHome NFC reader in order to target individual entities that are part of one of three NFC readers?
More Info…
I am building 3 (have two built so far) of the ESP8266 and PN532 standalone NFT Tag readers @adonno made. One by the front door, one by the back door, and one in my office.
I need help figuring out a way that I can separate the automations I build from the process of identifying which tag reader was used in order to have the tone and light feedback only happen on that device. Right now I need to duplicate all of the reader’s rtttl tone and led light actions for each reader. I’m thinking I need to handle some of the automation work in scripts, templates, custom sensors, or some other things I don’t know about.
I’ll use this example to frame my questions…
I want to put NFC tags on my dog’s leashes. When we leave to take him on a walk we scan that tag at either the front door or the back door. The scan will check a toggle helper to see if he has already been on a walk today, so his second walk can be shorter. Based on that toggle, the output will be a different tone and led color which should only happen on the NFC reader I used. I also want to check which leash is being used based on which tag is scanned. The regular leash has waste bags attached to the leash, but you can’t really attach bags to the loop harness leash, so when the loop leash is being used I want to play a reminder to grab bags.
So far I have a text input helper that gets populated with the “device_id” found in the event data from scanning a tag. The problem is that it is just a random string of characters, not a friendly name matching anything in HA. Also, while the “device_id” can tell me which reader was used, I don’t know how I would map those random device_ids for each reader to the individual entities I need to target in the automations. Ultimately I want to inject the correct entities for the light on and play rtttlt services in the action.
I don’t want this post to get too long, so let me know if you have any questions I can answer to clarify what I’m trying to do. Thanks!