Life360 Device Tracker Platform

I tried all the terminal command suggestions and reset my password but no luck. There is no option to delete the Integration when it wants me to reauthenticate, so I deleted the config/life360 folder & rebooted.

When I went to re-add Life360, I realized that my prior login credential had a username, but now they use your phone number (inlcuding the plus and country code, ie. +15555551212 for USA), and that worked! Maybe in addition to whatever else Life360 changed, they now have abandoned usernames.

Can confirm that this worked for me as well!

Thanks @pnbruckner and @MRobi for getting me up and running again!

@pnbruckner confirmed the fix has me back up and running. Thank you and all the other wizards that made this happen! Much :heart:

1 Like

Thx @pnbruckner :heart:
This works for me with HA Core on a RPI.

Hey guys, i’m new to HA and been tearing my hair out for 2 days trying to implement this fix. I have HAOS on a x86 mini PC.

Where/how do i make these changes? In studio code server? Can anyone explain like you are talking to an idiot, where in the Home Assistant menu’s do i need to go?

These are the steps that got me up and running again:
Deleted entry under Settings > Integrations > Life360
On the terminal:
docker exec -it homeassistant /bin/bash
cd /usr/src/homeassistant/homeassistant/components
rm life360 -r
mkdir life360
cd life360
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/__init__.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/__init__.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/button.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/config_flow.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/const.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/coordinator.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/device_tracker.py
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/manifest.json
wget https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/life360/strings.json

Went to Settings > Integrations added Life360 using phone number and password.

1 Like

it works for me, now im waiting the next release of HA 2023.12.4 that include this fix

Thanks for helping out with the instructions for HAOS! this worked for me too!

1 Like

In this thread there are several references to a modified api.py. Unfortunately, all links to the file are dead. Would someone be kind enough to make this api.py available again? Thank you

Interesting twist on a workaround! FWIW, I know it’s difficult to edit a file in this directory tree, which is why I had suggested using sed. But, deleting and grabbing a new, updated copy can work, too. But, in this case, you really only needed to delete and redownload a copy of manifest.json.

1 Like

If you’re going to modify or update any file, it should be manifest.json, not api.py. Please see several different ways to do that explained above.

But if you really want, you can create a folder named life360 in your system’s configuration directory, and copy the files from here:

life360/life360 at v6.0.1 · pnbruckner/life360 (github.com)

But, when the new HA release with the fix comes out, DON’T FORGET TO DELETE THIS FOLDER! Several people have had problems because they forgot to do this in the past.

Thanks a lot Phil.
My request for the api.py came from the fact that I have the HA installation running in a VM on my Synology and it is not clear to me how to find the manifest.json.

Everyone:

Please, once the fix is out:

  • Delete the <config>/life360 folder if you created one.
  • Delete the <config>/custom_components/life360 folder if you created one.

The workarounds and the final fix should not require you to change username (e.g., email to phone number) or password. The API to the server changed, which is what the fix compensates for.

Having said that, some people, who have switched from logging into the Life360 app with an email to a phone number have had issues trying to use the email as the username in HA. In that case, there seems to be success using the phone number instead.

If you can get to a command line (probably one that isn’t limited in some way), you can use the find command, e.g., “find / -name life360”. One of the results should contain “homeassistant/components/life360”. That’s where you’ll find the manifest.json file.

Thanks for the hint Phil.
I find it strange that the folder (/custom_components/life360)
seems to have been there the whole time even though I am on the latest HA version.

What folder?

In a normal install, there will be two life360 folders. E.g., on my system (which is a docker install):

HA:/config# find / -name life360
/usr/local/lib/python3.11/site-packages/life360
/usr/src/homeassistant/homeassistant/components/life360

The first is the PyPI package that contains the actual fix (i.e., the api.py file) in version 6.0.1. The second is the HA life360 integration that contains the manifest.json file that effectively “points to” the first. (Well, actually, it causes the first to be installed.)

I have access to the config folder via the Samba Share add-on.
In it I see a directory Life360. This directory contains:
The Folder: pycache
As well as the files:
init.py
api.py
exceptions.py
version.py

Then you’ve done this before. :smile: There normally shouldn’t be such a folder. Which is why this workaround can be less than optimal. You have to remember to remove it after the official fix comes out.

For what its worth, I just cleared out all existing life360 installs, reset my password, and tried your fix. Its still not authenticating

So I tried logging back in on my app. It now authenticates through an sms sent to your phone, and didn’t ask for my password.
I wonder if life360 themselves have blocked access from non phone related sources, as I also can’t find where to log in (using a PC browser)

I have heard something like this recently. It could be a new MFA requirement they’re adding. Although, from the little I’ve heard so far, it seems only to happen if you log into the app with a phone number instead of an email address. I can tell you I still use an email address for my username, have recently updated my Life360 password, and the HA integration (with a workaround in place) works.

As far as logging into Life360 via a PC browser, you can still do that, but there are only very limited administrative things you can do via the interface. They dropped the full UI via a browser a long time ago.