Life360 Device Tracker Platform

That’s interesting. I’ve seen the place attribute have the value none, but I don’t recall ever seeing it have the value unknown.

Yeah and it’s throwing one of my automations off.

dj

Just did a quick experiment. I turned my phone’s battery saver on, and immediately the Life360 app complained. I opened the app nevertheless, and HA’s Life360 tracker entity for my phone had its place attribute change to null. (I said “none” above, but I meant “null”, which is the “YAML way” of saying Python’s None value.) After closing the Life360 app, I turned the battery saver on and off. Whenever it was on, the place attribute was null, and whenever it was off, the place attribute changed to the Life360 Place where I’m currently located. Never saw “unknown”.

EDIT: Correction. When I looked at the attribute directly, it was null. But when I looked at it in the “more info” dialog, it was indeed “Unknown”.

So, looks like battery saver (at least on Android) causes the server to send Python None → YAML null → “more info” Unknown.

Question- Will the life360 attributes not update as long as the target phone is in the home zone?

I see my wife’s phone on the attributes, and today she went to the post office a couple of blocks away and her location wasn’t updating. Then I realized that the post office where she was at was slightly inside of my home zone. Could this be why her location never changed?

No, the zone a Life360 tracker is in (or not) has no effect on its ability to update. The “main state” of the entity might not change, and hence its state’s last_changed field wouldn’t update, but the attributes (including its last_seen attribute) and the state’s last_updated field, should still be able to update, assuming the server sends any new data.

UPDATE:

FWIW, here’s a graph of “time since last update” for the four Life360 entities in my system:

image

You can see two of the phones (light blue & orange, both of which are iPhones) tend to update about every 30 minutes while they are not moving, whereas the other two phones (both Android phones) tend to update about every 15 minutes while they are not moving. In all cases, when the phones are moving, they update much more quickly.

Of course, opening the Life360 app (on any of the phones), or using the life360.update_location service, can also cause the phones to update much more frequently.

Bottom line, in the case you described, if the phone was not updating, that has nothing to do with the HA integration (assuming you’re not using the life360.update_location service.) It’s strictly a function of the phone, its settings, and the Life360 app that runs on it.

0 km

  • where is system log?

…I ve 4 enties… 3 tracker…but are old tracker…I use only one tracker…I cancelled on my family group in app… but in home assistant I see it again…

I cannot cancel itt…?

Settings → System → Logs

Sorry, but that’s really difficult to understand. I’m not exactly sure what you mean, or what you are asking.

If the Home Assistant Life360 integration sees 3 Members, and therefore creates 3 device_tracker entities (one for each Member), but you only want to use 1 of them, then simply disable the ones you don’t want to use. You can do that in their Settings.

If by “I cancelled on my family group in app” you mean you left the Circle for the “family group”, but the HA integration still sees the Members that were in that group, that’s explained in the documentation. You need to reload the Life360 integration entry. Or, simply restart Home Assistant. It will then query the Life360 server again for the list of Circles your account can see, and the Members in those Circles, and adjust the device_tracker entities accordingly. E.g., if it then only sees you, then you will end up with just the one device_tracker entity for you. But remember, it can take a while for the list of Circles & Members to be fully retrieved from the server, so please be patient.

scuse me…I re-write:
I have 4 entities. 3 of these are trackers, one is mine, the other two are my family’s, which they no longer use. I went into the life360 app and deleted my family members’ trackers that they no longer use. Despite this, they remain in Home Assistant and I cannot delete these entities

Like I said before, reload the Life360 integration (Settings → Devices & Services → Life360 → three-dot menu → Reload), or restart HA. After it finishes retrieving the list of Circles & Members, it should delete the tracker entities for the Members that are no longer seen.

They will still exist in the entity registry, however, so you’ll still see the tracker entities. Their states will be unavailable, and they should have a restored attribute. You need to go Settings → Devices & Services → Entities, select them and remove them.

Released 0.5.1

  • Handle error 404 when Member removed from Circles

When a Member is removed from the known Circles, the corresponding device_tracker entity is not immediately removed. This only happens once the list of Circles & Members is retrieved (when the integration is loaded again.) In the meantime, avoid HTTP error 404 “not found” when entity tries to update itself.

  • Remove config entry migration

Config entry migration breaks in HA 2024.6 due to core changes. It is very unlikely that old life360 config entries exist, and it’s not difficult to add a new entry, so just remove the complicated migration code.

  • Avoid broken old versions of pytest-homeassistant-custom-component

The integration was being automatically tested with several versions of Home Assistant & Python. Unfortunately, that recently broke due to changes in an indirectly used pypi.org package. This release is now only able to test with HA 2024.6.0b5 or later, although HA version 2023.8 and newer is still officially supported.

Released 0.5.2

Late last year and/or earlier this year, some people tried some workarounds in an attempt to get the Life360 integration working again. One workaround involved copying early or experimental versions of the life360 pypi.org package to /config/life360 (i.e., a folder named life360 in HA’s configuration folder.) If they forgot to remove this workaround (i.e., if they forgot to delete the /config/life360 folder and its contents), that will break the new version of the Life360 integration. Typically, it will cause this error when attempting to add the Life360 integration entry:

Config flow could not be loaded: {"message":"Invalid handler specified"}

In this release, if this happens, there will also be an ERROR in the System Logs with a suggestion to fix the problem:

Error occurred loading flow for integration life360: If /config/life360 exists, remove it, restart Home Assistant, and try again

Also, a section was added to README.md to warn about removing the old workaround in /config/life360.

I’ve had a report that the query for Member details (the one that is sent every 5 seconds, for each Member) sometimes results in an error 403, forbidden, aka “login error”, which currently disables the account and creates a repair issue. I’ve never seen this myself, or heard anyone else mention it either until yesterday. (See issue #25.)

If you have ever experienced this (with the “new” implementation, v0.5.x or any of its beta releases), please let me know.

hi, I can’t log in with the phone because the area code is set (+1 US) how do you set another area code? Thank you

I have no idea. That is Life360’s website. You would have to ask them.

If your Life360 username & password do not work with the custom HA Life360 integration, and you can’t get the token using the work around, then you could try resetting your Life360 password. But do NOT verify your phone number afterwards. That should allow you to use the username & password with the HA integration. At least, that has worked for others before. No guarantees.

Information about how to reset your Life360 password is available here:

I guess I was trying to do to much. I removed the place attribute and I get what I need for my automation which is just if someone is home or not.

dj

New issue:

Every time I restart Home Assistant, I get a login error from the Life360 integration:
Life360 Account Login Error

I go to configure the integration and see this:
Life360 Account Disabled

If I click on modify account then enable , the “(disabled)” goes away. But life360 is not running. When I go back to configure, my account is marked “disabled” again.

Next, I delete the account and add it back with the email and token. Now it’s working again.

I’ve had some similar & related reports of this sort of problem. See issue #25.

I just released 0.5.3b0 which might help resolve some or all of these issues. Unfortunately, I don’t see these problems so can’t reproduce or verify the fix.

How do you recommend upgrading? The git shows the last update 3-weeks ago.

You can use HACS. Make sure to config it to show beta versions.

Or, if you’re checking out directly from the git repo, you can switch to the delay-ltd-retry branch, or you can switch directly to the 0.5.3.b0 tag. E.g.,

git fetch
git switch delay-ltd-retry

or

git fetch --tags
git switch --detach 0.5.3b0

How do I do this?