Question about NFC tags

I have some NFC tags and I set one up to turn on a light… when I scan it Home Assistant shows me it is being scanned but the light doesn’t come on…here’s the autionmation… but no matter what I do it will not work…

- id: '1676033579579'
  alias: Tag TV Stand Lights is scanned
  description: ''
  trigger:
  - platform: tag
    tag_id: 5457cd5c-6397-4c54-af53-ace73b2eeadc
  - platform: tag
    tag_id: ''
  condition: []
  action:
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.island_lights_2
  mode: single

It does nothing but show it was scanned… suggestions?

Thank you!

I think you can spot the error yourself :wink:

Yup, it’s happened to the best of us!

You ain’t lyin LOL

But I am using the editior from the tag menu and not writing the yaml itself…so I’m missing something simple that I just don’t see here LOL
Sorry but it is what it is… If I knew I’d fix it…I’m not seeing the issue…
Even went online and tried this one… doesn’t work

  alias: Tag Island light off is scanned
  description: ""
  trigger:
    - platform: tag
      tag_id: e38936af-8ba2-4c6c-bdaa-74f9fffb71cd
  
  action:
    - service: light.toggle
      data: {}
      target:
        entity_id: light.island_lights_2
  mode: single 

You want the light to come on. Your original post has the service
light.turn_off

instead of

light.turn_on

That is what we were referencing.

However, toggle should work as well. Does the light come on if you turn it on and off from the device info page?

I don’t know whether your code has a typo or just won’t work. I use tags to control my security system. I use the following trigger and it works very reliably. For context I define the terminal ID and Tag IDs in variables for validation.

    trigger:
      platform: event
      event_type: tag_scanned
    condition:
      - "{{ trigger.event.data.device_id in terminal }}"
    action:
      - choose:

OH gotcha but for reasons only known to the universe it now works… ?? LOL
I posted the wrong one but I have 2 tags on and off…
Can’t make this up…

1 Like

Thank you I’ll have to use that for mine too :slight_smile:

I know what you mean. I had a NFS mount stop working out of the blue and returning an error 111. After spending all day trying everything I read, it neve worked and I gave up. Next morning, up and working like nothing ever happened and is still working. Frustrating for sure.

Glad it is working for you now.

1 Like