Add NFC tags as a selector

Currently NFC tags are not accepted as selector for blueprints. I use them extensively throughout the house, mainly to reset reminders to do certain things. Did I change the water filter cartridge in Jan or Feb? No need to wonder as I have an NFC tag next to it. When I scan it, HA resets the last change date and send me a notification once it’s time to change it. I’ve got about 15-20 of these around the house. It would be great if I could change these into a blueprint, but currently ‘tags’ is not a valid selector.

You can accomplish this by a entity selector and use that in an entity state trigger. Here’s my example for controlling lights:

blueprint:
  name: Control a light or switch via NFC tag
  description: Given an NFC tag ID, toggle another entity on or off
  domain: automation
  input:
    tag_entity:
      name: NFC Tag ID
      description: Select the NFC tag entity that will trigger the automation
      selector:
        entity:
          domain:
            - tag
          multiple: false
    target_entity:
      name: Target entity
      description: Select the light or switch entity to control
      selector:
        entity:
          domain:
          - light
          - switch
          multiple: false
trigger:
- platform: state
  entity_id: !input tag_entity
condition: []
action:
- service: homeassistant.toggle
  data: {}
  entity_id: !input target_entity
1 Like