I have been working on automations that get triggered by scanning an RFID tag. This particular automation sends a message to a smartphone with the content of a text helper.
Why? Every storage box in our house gets an RFID tag (these cheap stickers). This makes it easy to find out what is in a box without pulling it down from wherever it is stored. Just scan the tag with your phone.
Part of the automation is the possibility to update the box content right from your smartphone. Our household has iPhone and Android users and I have managed to make it work on both platforms.


It works most elegantly on Android, where you can simply reply to the message with updated box content. The iOS variant relies on a dashboard that is opened on the iPhone from where box content can get updated.
Setting all this up is fairly straightforward.
Below is the Android automation
(insert your device IDs, the list of Tag IDs and the Mobile app entity for the device)
alias: Box Content Manager - Android
description: Android User
triggers:
- trigger: event
event_type: tag_scanned
conditions:
- condition: template
value_template: |
{{ trigger.event.data.device_id == 'YOUR DEVICE ID' }}
actions:
- variables:
action_close: '{{ ''CLOSE_'' ~ context.id }}'
box_map:
TAG_ID_1: input_text.box_1
TAG_ID_2: input_text.box_2
TAG_ID_N: input_text.box_n
box_entity: |
{{ box_map.get(trigger.event.data.tag_id) }}
- condition: template
value_template: '{{ box_entity is not none }}'
- action: notify.YOUR_MOBILE_APP
data:
title: WHAT'S IN THE BOX?!
message: '{{ states(box_entity) }}'
data:
priority: high
tag: Box
actions:
- action: REPLY
title: Update
- action: '{{ action_close }}'
title: Close
- wait_for_trigger:
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: REPLY
- trigger: event
event_type: mobile_app_notification_action
event_data:
action: '{{ action_close }}'
timeout:
seconds: 60
continue_on_timeout: false
- action: notify.YOUR_MOBILE_APP
data:
message: clear_notification
data:
tag: Box
- if:
- condition: template
value_template: |
{{ wait.trigger.event.data.action == 'REPLY' }}
then:
- action: input_text.set_value
target:
entity_id: '{{ box_entity }}'
data:
value: '{{ wait.trigger.event.data.reply_text }}'
- action: notify.YOUR_MOBILE_APP
data:
title: 'Box contents updated to:'
message: '{{ states(box_entity) }}'
data:
priority: high
tag: Box
- delay:
seconds: 5
- action: notify.YOUR_MOBILE_APP
data:
message: clear_notification
data:
tag: Box
mode: restart
The tags are added in HA using the mobile app and use the naming convention tag.box_n (n = 1,2,3 ...)

The text helpers should be named similarly as input.text.box_n (n = 1,2,3 ...)

When a new box is added the corresponding tag ID needs to be added to HA (using the mobile app), the text helper created and a line added to the box map in the automation (maps Tag IDs to text helpers)
Next up iPhone.
alias: Box Content Manager - iPhone
description: iPhone User
triggers:
- event_type: tag_scanned
trigger: event
conditions:
- condition: template
value_template: |
{{ trigger.event.data.device_id == 'YOUR DEVICE ID' }}
actions:
- variables:
box_map:
TAG_ID_1: input_text.box_1
TAG_ID_2: input_text.box_2
TAG_ID_N: input_text.box_n
box_entity: |
{{ box_map.get(trigger.event.data.tag_id) }}
- condition: template
value_template: |
{{ box_entity is not none }}
- target:
entity_id: input_text.current_box_entity
data:
value: '{{ box_entity }}'
action: input_text.set_value
- target:
entity_id: input_text.box_editor
data:
value: '{{ states(box_entity) }}'
action: input_text.set_value
- action: notify.YOUR_MOBILE_APP
data:
title: WHAT'S IN THE BOX?!
message: '{{ states(box_entity) }}'
data:
url: /box-editor/0
enabled: true
mode: restart
In this automation the message with box content is sent to the iPhone just like in the Android version. However, if the message is tapped on a dashboard is opened. From here the box content can be updated. This happens when 'save' is tapped which triggers a script (see below).
For this script to work two additional text helpers need to be created beforehand. "input_text.set_value" and "input_text.current_box_entity".
alias: Save Box Contents
sequence:
- action: input_text.set_value
target:
entity_id: |
{{ states('input_text.current_box_entity') }}
data:
value: |
{{ states('input_text.box_editor') }}
- action: notify.YOUR_MOBILE_APP
data:
title: Box Updated
message: |
{{ states('input_text.box_editor') }}
data:
url: /YOUR_DASHBOARD_OF_CHOOSING/
The URL at the end of the script sends the user to another dashboard. In my use case the iPhone users in my household cannot freely navigate dashboards so they would otherwise get stuck on the box update dashboard (although I have also added a home button on this page).
See below for the YAML of the box update dashboard.
views:
- type: sections
sections:
- type: grid
cards:
- type: heading
heading: Box content update
heading_style: title
icon: mdi:treasure-chest
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_text.box_editor
- type: button
name: Save
icon: mdi:content-save
tap_action:
action: call-service
service: script.save_box_contents
- show_name: true
show_icon: true
type: button
icon: mdi:home
tap_action:
action: navigate
navigation_path: /YOUR_DASHBOARD_OF_CHOOSING
name: Back to home

I have been working on this off and on for months and I hope that by posting the end result I can provide some inspiration for my fellow tinkerers. The WAF of this project was excellent!