Moved to 0.95, now life360 doesn't work

So it says in the docs that for us that had it previously configured, we need to change the config.
So I changed it to:


life360:
  accounts:
    username: !secret life360_username
    password: !secret life360_password
    driving_speed: 18
    interval_seconds: 10
    max_gps_accuracy: 200
    max_update_wait:
      minutes: 45
    show_as_state:
      - driving
      - moving

In the notifications it shows:
The following components and platforms could not be set up:

  • life360

In the log it shows

Setup failed for life360: No setup function defined

Your indentation is off a bit. Try:

life360:
  accounts:
    username: !secret life360_username
    password: !secret life360_password
  driving_speed: 18
  interval_seconds: 10
  max_gps_accuracy: 200
  max_update_wait:
    minutes: 45
  show_as_state:
    - driving
    - moving
1 Like

I am having a similar issue. After a re-install and setup of HA. I am trying to setup Life360 again
Getting this error on reboot
Setup failed for Life360: No setup function defined.
Have same config as @fribse above however with my login details to Life360

Also cannot see Life360 in the setup Configuration as option when you click the YELLOW + Sign in bottom right of HA

Do we still need to copy any files to Custom Directory?

please help thanks

Also, I do not have any device_trackers or sensor data showing in States Dev tools

Have you followed these instructions, linked from the 0.95 release notes:

And have you read the doc page:

When you have done that, and if you still can’t get it working, let me know and we can work through the details.

clearly not.

That’s ok. I don’t mind. Just want to make sure people who are having problems can get those problems resolved, and they might have missed the instructions for whatever reason.

Clearly not…That’s interesting.
Anyway couple of minor code inserts that were incorrect, and reset password for 360 sorted it
So did read the instruction, just not clearly enough it seems
Thanks @pnbruckner Much Appreciated for your help

I’m also experiencing the “Setup failed for life360: No setup function defined.” issue when moving from @pnbruckner custom component to the now integrated life360.

Below is my current configuration:

life360:
  accounts:
    username: !secret life360_username
    password: !secret life360_password
  driving_speed: 18
  interval_seconds: 10
  max_gps_accuracy: 200
  max_update_wait:
    minutes: 30
  show_as_state:
    - driving
    - moving
    - places    
  circles:
    include: Family

The doc’s clearly show a “-” before the username option, yet in the examples above that isn’t being used.

Can anyone point me in the direction of what exactly is incorrect?

Did you make sure to delete the custom life360 integration? If you leave it in <config>/custom_components it will cause issues.

Regarding the dash, in this case it can be there or not. When the config is read, it will effectively force (actually the term that’s used is “coerce”) the one dictionary into a list. So it basically will make this:

accounts:
  username: abc
  password: xyz

into this:

accounts:
  - username: abc
    password: xyz

It’s a “convenience” feature that is used by a lot of components. Very common in HA.

Regarding this:

  show_as_state:
    - driving
    - moving
    - places    

places is no longer supported, so you’ll have to remove that item.

EDIT: I just updated the instructions to add that places can no longer be used with show_as_state.

@pnbruckner I’ve just removed (deleted) the custom components directory and contents, removed places from the show_as_state: list and restarted HA. Still getting the same error. I’ve also removed the old custom configuration settings from configuration.yaml.

What version exactly of HA are you using?

I’m running 0.95.0

@pnbruckner I’ve just restarted the NUC and the life360 integration is now working. Thank you for your help. No idea why I needed a reboot.

Well, you shouldn’t have needed to reboot. There would have been a message in your log that reads something like this:

Loaded life360 from xxx

It would have been interesting to know what it said for xxx.

EDIT: Hmm, it seems that message is output too early in the boot process to make it into home-assistant.log. But you can see it using this command at a Linux command prompt:

journalctl -u [email protected] | grep "Loaded life360"

In my case it even seems to work across HA restarts. (Maybe that’s the default???) Anyway, if you can run that command, it might be instructive. E.g., it should say this:

...  [homeassistant.loader] Loaded life360 from homeassistant.components.life360

But if it said this:

... [homeassistant.loader] Loaded life360 from custom_components.life360

then that was the problem.

For those of us transitioning from the custom component, can you clarify the steps 1 and 5 in “Basic Steps” ? How do you Stop and Start HA ? Is it this ? :

. Sorry if it’s a stupid question, never saw these instructions needed before :slight_smile: Thanks (and btw, huge thanks to @pnbruckner for the custom component and now the standard one, it’s always worked great for me !)

Sure, you can use the STOP button there. How do you start HA normally?

The problem is you need to delete the old custom files, and you really can’t do that while HA is running and using it. I suppose you could remove life360 from your configuration, then restart (with the button you show), then delete the files, then add the (adjusted) configuration back in, then restart again, if you really would prefer not to stop and start.

Thank you. I should have mentioned I run Hassio on a RPi. I never had to “Stop” it per se, only restart it after I made a change to the config.
In practice, if I understand correctly, when I “Stop” HA, I can still access the files using Samba and at that point since they are not used by the system they are available to be deleted (from the PC). Then i go back to the web interface. Will the Configurator be running at that point ? I need it to change the config in step #4.
Maybe i am overthinking this, the second approach you just suggested, while it requires 2 restarts, makes total sense to me, so i might just use that…thanks again Phil !

I don’t use Hassio so I’m not familiar with the restrictions/limitations it imposes. Good luck!

Got it. I am not home at the moment or i would try to push the “Stop” button and see what it does in a Hassio/Rpi setup, but am afraid I won’t be able to bring it back up through the remote interface. Unless someone beats me to it, i will try tomorrow night and report back. Perhaps a different set of instructions are more appropriate for Rpi users that migrate from the custom component.