Life360 Device Tracker Platform

Very cool, thanks!

@pnbruncker so good thanks for all your efforts to get this as a standard compenent in 0.95, FYI running 0.95.0b1 with no problems legendary effort thank you :smiley:

2 Likes

I can confirm that show_as_state: is working perfectly in 0.95 beta 2.

Thanks a bunch for restoring this feature and the excellent work on the standard integration :slight_smile:

3 Likes

Thanks, Phil. I didn’t know that Life360 was now a standard integration. I’ll amend accordingly.
Thanks for your ongoing efforts - much appreciated!

1 Like

Just to clarify it’s not yet an official integration. Not until the next release (v95). You can use it as an integration now using the v95 dev version. But don’t expect it to work as an integration until you are on some style of version 95.

Hi,

just to let you know using the great Life360 CC, I’ve been able to persuade @ludeeus to help me add ‘country’ to the attributes of the device_tracker, and a lot more.
He made an AppDeamon app that uses the device_tracker.life360_name as input, and has it query an external python library, to add all available geo attributes to the existing device_tracker.
I can now show a country flag, simply based on a devices location :wink: :netherlands:

see How to iterate over a timezone list in (python) to find country(code) for all details, and enjoy.

It was my first iteration in AppDeamon, and I really like it…

1 Like

Not exactly sure what your point is. It is available in version 0.95.0b1 and greater. You can install a beta version without having to clone and checkout from github. Instead of the usual upgrade command:

pip install --upgrade homeassistant

you can specify a beta version:

pip install homeassistant==0.95.0b3

And if you’re using some install method where you can’t use pip and you’re hands are tied, well, then I guess I can’t speak to that.

Hi Phil,
As Ive only found out just now, the life360 device_tracker can show an incorrect attribute for time_zone now and then. One of my family members was displayed to be in Europe/Berlin, while the lat/lon gives the correct address in my own country. (before you ask, this is on a HA instance without my AppDeamon app for the extra attributes…)

On the instance that has the App installed, the same incorrect time_zone is displayed, but all the extra attributes are 100% perfect, based on the lat/lon

Is the attribute time_zone taken from the Life360 source, or is it calculated in your component? If the former: probably can do nothing about that, if the latter, maybe have another look?

It comes from the timezonefinderL pypi.org package.

ok, well, I am not familiar with that of course, but simply noticed today that I was in Brussels today (which I was not), and my daughter is still in Berlin (which she most definitely is not …)

maybe the geopy package (which my AppDeamon app uses to find the extra attributes) finds a better time_zone?

Brussels and Berlin are in the same time zone, GMT+2. It’s reporting a zime zone, not a city.

ah, with time_zone, I meant the attribute time_zone, as Europe/Amsterdam, not the GMT setting. As displayed on your device_trackers:

more-info
25 and

dev_state
28

figured these are the timezones: https://www.php.net/manual/en/timezones.php and not the GMT settings, which can indeed lead to an incorrect time_zone :wink:

Yes, it’s a time zone, not a city. ‘Europe/Berlin’ is the same as ‘Europe/Brussels’, they’re both GMT+2. I’m just taking what timezonefinderL returns.

well, that’s not correct then… there are many cities/countries in the same GMT zone, which leads to false conclusions possibly. As we see now.
Not sure what geopy returns for time_zone (I don’t use that for my AD app) but it does get all other attributes 100% perfect. Maybe worth a quick look?

Why do you say it’s not correct? It’s not trying to report a city. It’s only trying to report a name for the time zone, which as you say yourself, contains many cities. If ‘Europe/Berlin’ and ‘Europe/Brussels’ are equivalent, then from the perspective of indicating the zime zone, either is just as good as the other.

What is not correct is drawing the conclusion that a time zone indicator is also a city locator. It’s not.

you must understand that… and of course I understand it’s not reporting a city, but the continent and capital of the country the lat/lon belong to.

if

It’s only trying to report a name for the time zone, which as you say yourself, contains many cities. If ‘Europe/Berlin’ and ‘Europe/Brussels’ are equivalent, then from the perspective of indicating the zime zone, either is just as good as the other.

than you could probably agree that isn’t the optimal perspective… What would be correct is displaying format UTC +2 for my timezone. translating that to any of the possible (many tens of) time_zone names is a bit risky as it now turns out to be. What use is an incorrect attribute .

All the more, if another package could do this better (and of course I don’t know that, merely reporting what it does do perfectly), why not give it a look?

I mean, if the component bases all info on the given gps’s lat/lon, shouldn’t it be getting the correct time_zone’s name?

No, it’s not reporting that either.

First and foremost, the datetimes reported have the correct time zone “suffix”, e.g., ‘+02:00’. Reporting a name for the time zone was as easy addition. And when there are multiple choices, then any is as good as another for reporting a name for the time zone.

I’m sorry you’re trying to derive a city location from the time zone name. That’s not a valid thing to do. The attribute’s name is time_zone, not city, or even location.

If you want to report a city name for the GPS coordinates, that’s a feature request. And since I’m not working on the custom component anymore… :wink:

EDIT: I just checked the code again. In fact, it’s getting a time zone name directly from timezonefinderL, then it uses a HA utility to convert that to a tzinfo. So if you have an issue with the choice that timezonefinderL is making, Issues · jannikmi/timezonefinderL · GitHub

EDIT 2: Looks like there is a new version of timezonefinderL. I used 2.0.1, but now there is a 4.0.2. (Don’t get too excited, 4.0.2 is the next release after 2.0.1. lol!) Anyway, you can try changing the version in manifest.json and restart HA and see if it gives you any better results.

geopy can get city, country, etc from the lat/long values…not sure why you’re not getting the extra location details you want directly from the precise location rather than using timezone…

My point was that if they tried to configure the life360 integration in any version less than some flavor of V95 it won’t work.

I was saying that for the integration to work they would have to install some version of 95.

Ok, I was confused because I’ve said multiple times it’s available in 0.95.0 beta releases which are available now and have been since 6/19.

Guess it doesn’t hurt to make sure. :slight_smile:

1 Like