I just started playing with NFC tags and use a input_text
helper to verify things. I want to set the mobile phone’s device id to this input_text
helper so that I can use it for later notifications. But it seems the device_id I record is the first few chars of the actual one. Any idea why this happens?
Here is an automation
alias: Test nfc tag
trigger:
- platform: event
event_type: tag_scanned
event_data:
tag_id: <actual tag id>
action:
- service: input_text.set_value
data:
value: |
{{ trigger.event.data.device_id }}
target:
entity_id: input_text.used_by
So after a trigger and a quick check, the value input_text.used_by
is set to 2f...
of 16 chars. But the actual device id contains 32 chars. Actually, this device_id
embedded in trigger.event.data
is only the first half of the actual device id. Now I cannot use input_text.used_by
's value in other notification workflows because it will fail (invalid device id). Not sure why it has to trim off the second half.
Is that a bug in the companion app?
I am using HA app installed from play store @ 2022.10.2-full. My HA instance is @ 2022.10.5.