I tried using your method originally but there are 3 downsides for my scenario:
-
By registering and writing to the tag in home assistant every time the tag is scanned both applications show the notification. (home assistant shows that it detected the tag and siri shortcuts. No way to turn it off).
-
I couldn’t get it to run in the background. Meaning, just by taping the tag with the phone, the home assistant would sometimes not run or require an additional click. I just want it to work without prompting me for confirmation.
-
This is for a door lock. So I highly prefer not writing anything to the tag but rather just use the tag’s ID and register it in the siri shortcuts.
Siri shortcuts then takes care of firing the event and notifying home assistant.
This article describes the limitation of scanning NFC tags in iOS and running the action without confirmation.
scroll down to “Shortcuts Automations” section:
or here: