Thanks m8! its working now. Can you share the automation?
Sure here it is. I actually also have a 2nd automation that does a reload every hour, just in case
alias: >-
System - Reload Configuration 2minutes after boot to make the Airtag Rest call
work
description: ""
trigger:
- platform: homeassistant
event: start
condition: []
action:
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: homeassistant.reload_all
data: {}
mode: single
Can you explain a bit more. Bit difficult to understand why something is correct or wrong. Is the text where you write wrong a street name? What is wrong about it?
The latitude and longitude are correct but the address is not. If i try coordinates in geoapify the give me the right address.
It has to do with this part of the code. But tbh, I dont understand this code. I dont understand the check on “:” as I never see that on my iphone. It also doesn’t work for me. Whenever there was “Home” displayed on my iphone, the solution will not work. I ended up making my home address on the iphone someplace far away so that it always shows the address in Find My and never “home”
@TiToTB might be able to explain what this code should do.
{% set home = "Streetname" %}
{% if ":" in states('input_text.airtag').split('backpack')[1].split('•')[0] %}
{{ states('input_text.airtag').split('backpack')[1].split('•')[0].split(',')[0] }}
{% elif home in states('input_text.airtag').split('backpack')[1].split('•')[0] %}Home
{% else %}
{{ states('sensor.airtag_backpack_geo') }}
{% endif %}
You can see “:” when the status is “Last seen:…”. That is the reason of that part of the code.
Also, “home” is a variable. It converts your Home address in “Home” value, if you have set if before (“streetname”)
Hi everyone,
I have a problem with my German iPhone.
In Find my… App the state is Privat
if at home (not Zuhause
as expected.
We have a street in Hamburg called Privatweg
.
This part of the template seems to find the location of my items at Privatweg
.
resource_template: >
{% set address = states('input_text.airtag').split('Ranzen Mads')[1].split('•')[0] %}
{% if address == "Privat" %}
Shouldn’t this only work if it’s Privat
and not Privatweg
or something like Privat...
?
EDIT:
Never mind - I asked ChatGPT and I will try that
{% if address == "Privat" and address != "Privatweg" %}
How did you change the home address on the iphone?
As everything in iOS (I really don’t like the Apple ecosystem and use Android for everything else besides these airtags) it is in a very weird location:
Add or change your home address in Maps on your iPhone or iPad - Apple Support
+1 for that! i only have an old iPhone for this haha. Thanks m8.
I do see that we can probably switch to Google for the tag integration soon.
Find My Device Trackers on Android are Coming! (youtube.com)
My phone is connected today i saw. Wont be long before the Tags are being produced. I already see Chipolo Point finders for Google’s Find My Device app - Chipolo and Google Find My Device – Pebblebee
Hopefully the integration with Home Assistant will be a bit smoother. The work that @TiToTB has done is truly amazing and creative, but I would prefer to get the coordinates straight from an Google API. Fingers crossed.
I agree! I cant wait to have this solution in android.
However, it might take some time until we can find more affordable devices (hopefully i am wrong)
I appear to not be receiving lat/lon coordinates: any ideas?
latitude: null
longitude: null
status: available
last_update: 28/05/2024 15:34h
icon: mdi:bag-personal
friendly_name: mybag
see this post AirTag "integration" (user friendly + device tracker) - #140 by john2014
Reload the configuration
I did everything in the article but my home location is still the old one in find my app. Is there something else i can do?
Hi everyone,
since quite a while I try to get the Airtag tracking solution to work.
However, I struggle with the address when using a German phone:
See my post #148
And I still have the issue that Privat (iphone in German means “Home”).
For testing I switched to Englisch, but I still get wrong matches.
Now the address (when “Home”) is considered to be a restaurant called “Home Sweet Home”.
In larger cities like Hamburg it’s easy to find a match somewhere close by.
Part of my Airtag text string is e.g.
Items Backpack Joe Home • Now
So this should set my home address correctly:
{% set address = states('input_text.airtag').split('Backpack Joe')[1].split('•')[0] %}
{% if address == "Home" %}
{% set home = "my address, Hamburg" %}
{{
"https://api.geoapify.com/v1/geocode/search?text="
+ home | urlencode
+ "&apiKey=myKey&format=json"
}}
Anyone with similar issues?
I had the exact same issue (the check on Home just does not work), I could not figure out how to solve it see AirTag "integration" (user friendly + device tracker) - #146 by john2014
So like I mentioned there, I just changed the location of my Home to be far away. But I can understand that if you are using your iPhone as a daily phone, that that is not a great solution.
Try to add a blank space before and after Home in your template, like this
I address == " Home "
Or you can just remove your home address from your iPhone to get the actual address
Hope It helps
I tried it with a blank space before, but not after yet.
What’s strange is, that the dashboard shows this (with spaces):
But if I click on it, there is no space before “Privat
”
However, the state in the dev tools also has the spaces: