AirTag "integration" (user friendly + device tracker)

where did you fail? on creating the shortcut for the “n” helpers? if so I can support

yes. I tried it worked for some week then I don’t know why it stopped working and i was unable to restore it.

try as first step open App Home Assistant, wait for few seconds, about 3-5, and then proceed with the normal steps, I guess this way we can help the step for Call service. I have tried it and it seems to work, at least for me and for now… let’s see how it develops…

Can you share link to your “fork”?

I think that if it’s solid we can ask Tito to add that feature to original solution so everyone could benefit

what do you mean? the shortcut? actually I struggled a bit to transfer it from my personal Iphone to the airtags one. Something about permissions, etc. Maybe I can make screenshots and you can recreate it on yours, or also if it worths Tito can add it. I think that the error when Calling a service is very common, tested on 3 devices, one of them is a top one so it’s not only affecting old devices. Of course it makes more sense for devices working only for this matter, as it’s taking longer through the steps… in my case 2 seconds of delay after open HA.

I’ll take the screenshots tonight when I’m at home so you can work on it.

Key point: As my main device for the airtags+clones is my personal one, and shared with the old one. each Object says “shared with Manuel”, so I’m using that sentence to split the objects, taking adventage that it’s a larger value than “*”, which was deleted from the Objects’ names.

btw, thank you so much for the automation steps, it’s working great, I also added to the first helper a command split to delete everything before the first object. In my case it was “conmigo” / “with me”. I guess that everyone has to adapt it to their particular situation and goal.

write you later!

2 Likes

Hi! these are the steps on my Shortcut. As previously said, I used “Se comparte con Manuel” to split the Objects because it was convenient for me, if there is no repeated value for each Object in your case, the * keeps being a nice option.





2 Likes

Hi, i try to implement your solution. I’ve setup Gmail in HA and created the App Script Project.

Can you guide me please how to trigger now the Shortcut? Do i need to adjust the shortcut?

you need to add an automation in the shortcut app that in turn triggers the shortcut.

Ok, works now, i can trigger the Shortcut via E-Mail with the Automation.

What is not working that Gmail is cleaned up. So i have just copied the App Script part and saved in a new project. Is there something else to do because it is not clear for me how the script is triggered?

you need to add a trigger like this

triggers are the 4th icon
image

Also note that in order to make the script work (if you copied it exactly), you need to use “Update Location items” as subject of the emails. If you want to use another subject, then you need to modify that in the script.

Thx, got it, i have adjusted the subject and created a trigger. It works.

Only thing i got not solved is how to read and split objects which are shared.

Do i need a second shortcut searching for the title “Objekte | Geteilt”? - Next challenge is also that the text helper stores only 255 signs which ist not enough for the list of shared objects i have.
How did you solve this?

thanks!

After some tentative I finally manage do make it works.

I think my issue was with variable names…i still see spanish names of them and don’t know exactly why but I will not test my luck again!

@TiToTB if you want to “merge” it be my guest :slight_smile:

1 Like

Can you share please how you get it managed? Did you keep using the * as separator?
I am struggling with the spanisch screenshots and the logic behind. Would be relly appreciated to get more insights from you how you solved it!

Yes still use * as separator.
The change is that I duplicated the count element part and splitted as follows:

From 2 to 4 (4 is the change from the original value
From 4 to count (as in the original value)

Starting from this I then duplicated the following actions so created another dictionary

This was the tricky part because even if the variable as same name (still in Spanish) this time i found a way to link to 2 different variables

And finally this variables populate another call to service

Thanks everybody! i will!

1 Like

Hi there

there is an issue with the iphone automation. it seems that the split does not work.

in my home assistant input_text.airtag the name of my bike is still shown.

I dont have the 255 problem, but some other people were just discussing this here, so if you read a bit back in this thread, you should find some info.

I’m suffering the same issue as some others have mentioned about “Home” not being recognized. It has something to do with the template. I tested in the Template Editor with the following results. It is basically showing that, even though the address is being set to “Home”, the if statement doesn’t recognized it. I tried the spaces before/after etc.

TEMPLATE EDITOR

Start Test (if “Home” in address)
{% set address = states(‘input_text.airtag’).split(‘Dave’)[1].split(‘•’)[0] %}
Address shows as
{{ address }}
{% if “Home” in address %}
{{
“True”
}}
{% else %}
{{
“False”
}}
{% endif %}

Start Test (if address == “Home”)
{% set address = states(‘input_text.airtag’).split(‘Dave’)[1].split(‘•’)[0] %}
Address shows as{{ address }}
{% if address == “Home” %}
{{
“True”
}}
{% else %}
{{
“False”
}}
{% endif %}

RESULT

Start Test (if “Home” in address)

Address shows as

Home

      True

Start Test (if address == “Home”)

Address shows as
Home

      False

A lot of posts back (this thread is soooo long :slight_smile: ) i mentioned this as a solution to this. For me the “if address == “Home”” also just does not work.