This is a great addon, and Iâm glad to hear itâs slated to be a native part of HA. How do we use the information reported by Life360? For exampleâŠI want to create an automation based on battery level. Device tracking is working fine, and the battery level is reporting correctly on the entities card, but how do I actually use that information? Iâve read through all of the 1050 posts here, and Iâm having a hard time believing this isnât possible. Maybe I missed it?
sensor:
- platform: template
sensors:
eryins_iphone:
friendly_name: "Eryin's iPhone Battery"
unit_of_measurement: "%"
value_template: "{{ state_attr('device_tracker.eryin_morrison', 'battery') }}"
Example straight from my wifeâs phone using Life360
I guess Iâm missing something, but I donât see where this references the life360 platform at all. My device tracker for life360 is device_tracker.life360_username . Did you rename your life360 device? Thanks for the help.
Just substitute the device tracker used in the code with yours. The idea is that the device tracker has many attributes and the example provided by @atomicpapa is basically creating a sensor specifically for the attribute youâre interested in.
Iâm trying to create an automation that notifies using notify ( service: notify.all )
I use the person component ( person.* ) for each person
Iâd like it notify when anyone ( person.* )
enters/leaves any zone ( zone.* )
it would then notify.all
With a message similar to
person X has entered zone Y
ie: Bob has left school
Steve has arrived at Burger King
Iâve seen a few different way to do this, but is there a preferred way?
The automation examples at below link donât cover automations related to entering/leaving zones.
Yes. The way that works for you and you like best. But seriously, I donât think there is a âpreferredâ, or even a âbestâ way. But, FWIW, here is âaâ way that you might find useful:
How can I create an automation for situations when Iâm going home?
Using the state âtowardsâ seems not be working, and most of the time, even when Iâm driving my state keeps as âstationaryâ.
Where exactly are you seeing âtowardsâ and âstationaryâ?
I am using the information shown in the Status column, as it is displayed at http://myip:8123/dev-state
On this moment just displays âhomeâ
If Iâm completely wrong, sorry
So I have no idea how the state of the device_tracker could be âtowardsâ or âstationaryâ, unless you have zones with those names, which I doubt.
How about letâs take a step back. Can you describe exactly what youâre trying to achieve? Or if you have an automation written, even if itâs not completely working the way you want, can you post it?
OMG Sorry! Wrong place! âtowardsâ and âstationaryâ appears on the dir_of_travel info⊠My bad
My code-related automation:
configuration.yaml:
proximity: home: zone: home devices: - device_tracker.douglas_dall_agnol tolerance: 2000 unit_of_measurement: m sensor: # Dir of Travel Sensor - platform: template sensors: home_dir_of_travel: friendly_name: 'Dir. of Travel - Going Home' value_template: '{{ state_attr("proximity.home","dir_of_travel") }}' entity_id: proximity.home
automations.yaml:
- id: '1560775635954' alias: Turn on lights when close to home initial_state: 'on' trigger: - platform: state entity_id: sensor.home_dir_of_travel to: 'towards' for: '00:00:10' condition: - condition: numeric_state entity_id: proximity.home below: 900 above: 30 action: - alias: '' data: entity_id: switch.sonoff_100046ac01_3 service: switch.turn_on - alias: '' data: entity_id: switch.sonoff_100046ac01_1 service: switch.turn_on - alias: '' data: entity_id: switch.sonoff_100046ab72_2 service: switch.turn_on
Ok, so what exactly are you wanting help with? What doesnât work or at least doesnât work the way you want? Are you seeing any errors?
I expect to run this automation when Iâm getting close to home, below 900m. Itâs possible?
Just looking for some suggestions and hoping someone here has ran into it. I just recently added Life360 and itâs working great⊠but on my daughterâs phone (a cheap TCL Android) Life360 constantly stops updating unless I go click in the app. I have everything enabled to allow it to run in the background as far as I can tell but Iâm not very familiar with Android devices. I know itâs not really a Home Assistant issue but was hoping maybe someone has had this issue as well.
What version of Android? If itâs a newer one with Doze, you may want to turn off battery optimization.
Then the trigger you have is wrong; remove it. And what you have for the condition (without the above part) should become the trigger.
FYI, HA release 0.95.0b0 now contains the standard life360 integration.
@pnbruckner I just read the docs for the post 0.95 standard component, VERY COOL!! I see there will be some configuration changes needed to support the new method. How long will the legacy config continue to work? Life360 works great for me right now and I am not in a big hurry to go to make any changes.
I donât plan to delete the custom component from my github repo anytime soon. On the other hand, I donât plan to make anymore changes to it either to keep it working with new versions of HA. How long it continues to work is anyoneâs guess.
If you donât want to be surprised someday, after 0.95.0 is released you might want to consider changing to the standard component. (Of course, you can do that now with the beta.) The config changes arenât very extreme, and you donât even have to change to using the UI to add the integration. Your Life360 account(s) can still exist in the YAML files, albeit with a slightly different format. And thereâs a few config options that no longer exist so youâll have to delete them. Except for the zone and time zone features, the standard component is pretty much the same as the custom component was.