
Geolocation in Home Assistant with Life360
In this post we can see another of the wonderful integrations that we can do with Home Assistant, since we will be able to geolocate our family in the simplest way. We can have a map and see where everyone is, define zones as Work, Gymnasium, Mother-in-law's House, Ikastola… as well as with automations receive alerts when someone enters/leaves an area and much more!
Integrating Life360 with Home Assistant,
First of all, Before you begin, you must have the Life360 app installed on your mobile device to be able to track your GPS position, just like on your family's devices or go, of whomever you want to join to your map. You will see that in 2 minutes you have it assembled and you will see your family members in a jiffy.
We start now in Home Assistant or Hassio, we will have to enable it in: Configuration > Integrations and clicking from the + we write and select Life360.
We indicate our Life360 account with which we have registered from our phone & Click on “Submit”,
“Finish”,
And we restart Home Assistant or Hassio.
In known_devices.yaml it will automatically add and detect the accounts, We can customize the name, photo… He leaves them like this:
[SourceCode]life360_hector_herrero:
hide_if_away: False
icon:
mac:
Name: Hector Herrero
picture: https://www.life360.com/img/user_images/8e48c020-3466-4c85-a4c7-cfbcca2d8797/15796125-b3f7-4d84-b69a-c557047c9d59.png?fd=2
track: True
…[/SourceCode]
If we want to see the % of mobile device battery usage, added in configuration.yaml in the sensors section:
[SourceCode]sensor:
…
– Platform: Template
sensors:
bateria_hector:
friendly_name: Hector Battery
unit_of_measurement: ‘%’
value_template: ‘{{ states.device_tracker.life360_hector_herrero.attributes.battery|round }}’
device_class: Battery
…[/SourceCode]
And we can add entity cards in the Home Assistant interface where we can add our users…
Configuring Zones,
We will follow these steps if we want to configure zones in Home Assistant, to know the exact place, or get statistics, or generate certain automations such as alerts, The woman is coming home! We'll have it in 2 minutes! The first thing will be to define these zones from the Life360 app on our mobile phone, there we will add Places, we look for them on the map and delimit them, We can make the zone (The Circle) Smaller for greater accuracy, and add all the Places we need.
Once done, we will have to enable logging in Home Assistant to debug, We edit our configuration.yaml configuration file:
[SourceCode]Logger:
default: Debug[/SourceCode]
We restart Home Assistant and search the log for what the zones are called (and its definition) that you may have read to us from Life360, in my case in /usr/share/hassio/homeassistant/home-assistant.log we look for Life zones 360:
[SourceCode]…
2019-11-33 11:23:31 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Circle's Places:
– Name: House
Latitude: 43.264190
Longitude: -2.949333
RADIUS: 152.4
– Name: Office
Latitude: 43.268718
Longitude: -2.934076
RADIUS: 152.4
…[/SourceCode]
We will have to copy those areas and add them as they are in our configuration.yaml file. That's where we created the Zones, Staying:
[SourceCode]…
zone:
– Name: House
Latitude: 43.264190
Longitude: -2.949333
RADIUS: 152.4
– Name: Office
Latitude: 43.268718
Longitude: -2.934076
RADIUS: 152.4
…[/SourceCode]
And after restarting Home Assistant we will see the new configuration, We will be able to see where each person in the family is, good on some cards, Good on a map!!!
Notifications
And well, In this part I leave you a couple of examples of automations.
![]() |
![]() |
In this first example we see that when Hector arrives home, a Telegram notification is sent and also through the speakers at home it is also notified thanks to Volumio.
![]() |
![]() |
And in this second example, We have the possibility of alerting ourselves, for example, when someone exceeds a speed, in this case when Hector goes over 120kmph, A notification will arrive on Telegram.
Don't tell me that this integration is not a blast? We will see many more curiosities that we can add to Home Assistant or Hassio, I hope you enjoyed it!