It works well, with one problem. While the card is close to the reader it continously sends the tag to Home Assistant.
In Home Assistant i have an automation that triggers on tag_scanned. Sometimes my automation fails and it’s very hard to debug, because of the huge number of incoming tag_scanned events.
I want to deal with this on the ESPHome side, i.e. send less events.
What i am looking for is something like a user defined delay bewteen the sending of the tags, or something similar. The delay in the code above does not work.
Does anyone have a clue how to implement that?
Thank you for the idea but this would not be useful for my case. I have many different RFID tags (>60) and my Home Assistant automation uses the ID of the tags, and i want to keep it this way (Each tag triggers a different playlist on a media player). Your suggested solution would meant that i would need a binary sensor for each tag in ESPHome, that is not feasible for me. It’s easiser to manage the different tags in the Home Assistant automation than in ESPHome.
Well it can be done, but I don’t want to update ESPhome everytime I add a new RFID tag. If I understand the example correctly, each new tag that I add requires an update of the ESPHome to add a new binary sensor with the corresponding UID.
In my current setup I only need to edit the automation in home assistant and I was hoping that I could leave it that way