My user is away according to HA, yet if I go to life360 app on my phone is says I am home.
I had to erase integration, re-add, and the rename the entities to something else.
Please see:
Let me know if this helps.
So thats what I kind of did, but after reading that I think I just needed to rename the entities as described.
I wasn’t allowed to retain support for the prefix option, so this, unfortunately, is what is required. Also the old known_devices.yaml entries were going to cause a problem no matter what I did (because they get processed first and effectively reserve the entity IDs, so again, nothing I could do about that.)
Gotcha. No worries. Thanks for your time making the integration.
Thanks.
For future refence, for anyone else that comes across this topic, the release notes breaking changes section for Life360 has been updated to better explain the change and what to do to get your system working again.
Hi there.
I think I am missing something in this process. I upgraded to 2022.7 and now my life360 integration isn’t working. I followed the steps outlined above where I commented out the entry in the known_devices.yaml file that referenced my life360 entities. Rebooted Home Assistant. Now those entities no longer show up in Developer Tools - States when I search for “life” (without the quotes). The steps above refer to old entities and new entities. I have removed the old entities but I don’t know what the new entities are called. Is there a step I missed? Do I need to delete the old life360 integration?
How do I add the new entities so I can see them in Developer Tools - States?
Don’t filter the entities, and make sure you refresh your browser (e.g., F5.)
The new entities should exist, and IDs should be similar to what they were before, but without the “life360_” prefix (or whatever it was if you used a different prefix.) Or, if you had configured life360 to not use any prefix (probably uncommon, but possible), then the new IDs will be what they were before, but with a “_2” suffix.
Once the old entities are gone, you can change the entity IDs of the new entities to be the same as you used before (e.g., change device_tracker.first_last
→ device_tracker.life360_first_last
), or you can just keep them the way they are. Totally up to you.
I tried not filtering the entities and refreshing the browser and I still don’t see any entities life360 related.
I rolled back to the last HA release before 2022.7 and I see my life360 entities as expected. I then upgraded to 2022.7.0 and I no longer see my life360 entities even though I still have them in my known_devices.yaml file. I also don’t see any new entities that might be the same as the old but just without the " device_tracker.life360_" part.
I don’t know if this is related or not but I also see a notification that I have invalid configs for two integrations. device_tracker and ios. If these are related, I appreciate any help you can provide. When I check the logs I see the following three entries:
Setup failed for ios: (DependencyError(…), ‘Could not setup dependencies: device_tracker’) (ERROR) setup.py
Logger: homeassistant.setup
Source: components/device_tracker/legacy.py:306
First occurred: July 6, 2022 at 5:15:35 PM (1 occurrences)
Last logged: July 6, 2022 at 5:15:35 PM
Error during setup of component device_tracker
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 235, in _async_setup_component
result = await task
File “/usr/src/homeassistant/homeassistant/components/device_tracker/init.py”, line 50, in async_setup
await async_setup_legacy_integration(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 161, in async_setup_integration
legacy_platforms = await async_extract_config(hass, config)
File “/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py”, line 306, in async_extract_config
raise ValueError(
ValueError: Unable to determine type for life360: None
Logger: homeassistant.setup
Source: setup.py:136
First occurred: July 6, 2022 at 5:15:36 PM (1 occurrences)
Last logged: July 6, 2022 at 5:15:36 PM
Unable to set up dependencies of ios. Setup failed for dependencies: device_tracker
What do you have in your YAML config files for device_tracker
and/or life360
?
It would seem you have something like this somewhere in your config files:
device_tracker:
- platform: life360
BTW:
I didn’t mean without “device_tracker.life360_
”, I meant without the “life360_
” part. I.e., if the entity ID was device_tracker.life360_first_last
, then the new one will be device_tracker.first_last
.
But first we have to fix the problem in your config that is causing that exception.
Thank you very much kind sir!
It would seem that the step to remove the platform: life360 from device_tracker: was the solution for me.
I see the new entities as you have indicated I should.
Thanks again!
Glad you got it working!
FWIW, you should never have had that in your config, at least not since life360 has been a built-in integration (0.95.0 and later.) That is not how life360 was supposed to be configured. (It was, way back when it was still a custom integration, but that was eons ago! )
I use Life360 for the 4 family members in the house.
I run an automations that triggers based on the amount of people home.
So Zone.home changes between 0-4
zone.home=4 when everyone is home and 0 when noone is home.
Is there any way to change this behaviour and instead use the away status?
So for example, I would like to use Away=4 instead of home=0
This is because sometimes Life360 status becomes unavailable. And this triggers the automation Zone.home=0
If I loose Wifi or if Life360 status becomes unavailable for all family members, home assistant reads this as 0 people home, and flicks off all the lights
I would much rather use when away=4 flick off all the lights.
Any Ideas?
The behavior you describe is based on, what I consider, a flaw in the HA architecture. They require integrations to change their entities to unavailable when there is a problem communicating with the server. I don’t agree with this, but there was nothing I could do about it.
What I, and others, do, is to use my custom composite integration “on top of” Life360 (and possibly other) device tracker entities. The composite integration ignores these unavailable states. Alternatively, you have to create more complicated automations to deal with them.