We have new items in our store. NFC tags, more about those tags you can read at our shop webiste …
Here is guide how to use this tags in Home Assistant automation and why we think it’s pretty cool.
Link to Home Assistant docs: https://www.home-assistant.io/integrations/tag/
Go to Home Assistant Settings in mobile app. You have to give NFC permissions to mobile app.
Go to:
It’s ready. Tag is ready to be used in automation
This can be done either in any version of Home Assistant, on your PC as well.
Go to Automations and Create new automation.
Add triger, start typing Tag
Choose tag you named
Create action you’d like to do, eg light toggle and toggle light.
It’s ready!
Those NFC tags are great to open your front gate, doors etc. If you stick it in your car you might use them accidentaly. So let’s check if phone which is triggering this automation is in home zone to be sure. This tutorial assumes that you have your zones configured correctly.
Add condition to automation: template.
put this code
'{{ (states.person|selectattr(''attributes.user_id'', ''eq'',trigger.event.context.user_id)|first).state == "home" }}'
In yaml mode it would look like this:
condition: template
value_template: >-
{{ (states.person|selectattr(''attributes.user_id'',
''eq'',trigger.event.context.user_id)|first).state == "home" }}
That’s make sure that person who triggered automation is in house.