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?
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 %}
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:
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.
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"
}}
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.
seems like some kind of alternative value for the space character.
(i also noticed that the iOS update changed my Home address to my real address again, so I should really find a way to get Home to work ))
I deleted my home adress in my personal details and deleted Home from Apple Maps.
Even after a power cycle of my phone, I still see “Privat” next to my Airtags.