Integrations

Tag

Spook adds actions to create, change and delete the NFC tags and QR codes Home Assistant knows, from your automations and scripts, without a trip to the Tags page.

The tag integration in Home Assistant knows the NFC tags and QR codes you scan with your phone. Every tag has an ID, written on the tag itself, and a name, and scanning one can start an automation. You find them under Settings > Tags.

Home Assistant lets you add, rename and delete tags on the Tags page, by hand. Spook adds actions for it, so an automation or a script can do the same: add the tag for a new sticker, give it a name and a description, and delete it again. An assistant with Spook's tools can do all three too.

Actions

Spook adds three actions for tags. You find them wherever you add an action, marked with a 👻. All three are for administrators only, the same as the Tags page.

Every tag has an entity, which Home Assistant names after the tag, and which shows when it was last scanned. The actions leave that the way the Tags page does: a new tag gets one, a new name renames it, and deleting a tag deletes it too.

Create a tag

Creates a new tag, the same as adding one on the Tags page.

You stuck a new NFC sticker next to the front door. Writing it with your phone gives it an ID, and Home Assistant adds the tag the first time it is scanned, without a name. With this action, the tag is there before that, with the name and description you want.

How to use it

  1. Open the automation or script that should create the tag, and select Add action.
  2. Search for create a tag, and select Tag: Create a tag 👻.
  3. Fill in Name, like Front door.
  4. Fill in the Tag ID that is on the tag, and a Description if you like.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it creates the tag for real.

Delete a tag

Deletes one or more tags, with their entities, disabled ones included.

The other half of Create a tag: the sticker came off the door, or the QR code went out with the old fridge. Everything in the list is checked first: if one of them cannot be deleted, none of them are.

How to use it

  1. Open the automation or script that should delete the tag, and select Add action.
  2. Search for delete a tag, and select Tag: Delete a tag 👻.
  3. Under Entity ID, choose the tags to delete.
  4. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it deletes the tag for real.

Update a tag

Changes the name or description of tags, the same as editing them on the Tags page. The change stays, through a reload and a restart.

A tag added by scanning it has no name, only its ID. Or the sticker moved from the front door to the back door. Without this action, that is a trip to the Tags page. With it, the script that sorts out your tags does it too.

How to use it

  1. Open the automation or script that should change the tag, and select Add action.
  2. Search for update a tag, and select Tag: Update a tag 👻.
  3. Under Targets, choose the tag.
  4. Fill in what should change: Name or Description. What you leave out stays as it is.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it changes the tag for real.

Use cases

What people use this for:

  • Add the tag for a new NFC sticker before its first scan, with a name and a description that says where it is.
  • Give the tags that were added by scanning them a proper name in one go.
  • Clean up the tags of stickers that are gone.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.