I’m sorry for posting in Portuguese and thanks for helping!
Got any way to change the name driving and moving and none to dirigindo, movendo and indefinido?
I would like a lot of help solving this
I’m sorry for posting in Portuguese and thanks for helping!
Got any way to change the name driving and moving and none to dirigindo, movendo and indefinido?
I would like a lot of help solving this
Not directly as far as I know. At least not without modifying the code.
You could create a Template Sensor, though. That’s about all I can think of.
Hi Phil, Thank you for this integration.
I get this error in my HA Log everytime i restart HA.
Invalid credentials for life360_user
8:14 PM components/life360/config_flow.py (ERROR)
The integration is working fine but I just have this error consistently.
The username and password are correct in secrets are correct.
My config:
life360:
accounts:
- username: life360_user
password: life360_password
driving_speed: 15
show_as_state:
- driving
- moving
warning_threshold: 10
error_threshold: 20
Any suggestions?
Thanks
Hi!
I’m not sure I understand your configuration. If you’re getting that error, then that means the username & password from your YAML config is wrong. The config you show, and the error message, say the username is “life360_user
”. Is it exactly that, or did you modify the config/message when posting it (to redact the real username)?
You also mention the secrets file, but I don’t see in what you posted that you’re actually getting the username & password from the secrets file.
Lastly, you say it’s working. Does that mean you also entered your username and password via the Integrations page in the frontend? If so, just remove the accounts
option from the config YAML file (and leave the rest.)
As soon as I read your response my mistake became glaringly obvious.
Yes I had entered the credentials in the frontend and didn’t need the account section in my config which ofcourse the config was missing the !secret for the username and password.
Error gone now!
Thank you
could post an example of a model for me to try here friend
Tks
sensor:
- platform: template
sensors:
me:
value_template: >
{% set state = states('device_tracker.life360_me') %}
{% if state == 'driving' %}
dirigindo
{% elif state == 'moving' %}
movendo
{% else %}
{{ state }}
{% endif %}
I did not test for “none” because I have no idea how it could have that value. But feel free to add it if you like.
Thank you so much for helping friend, I will test today and post the result.
Thank you so much friend
Worked perfectly.
I have setting
platform: template
sensors:#-----
life360_me_appear:
friendly_name: “me appear”
value_template: “{{ state_attr(‘device_tracker.life360_me’, ‘last_seen’).astimezone(now().tzinfo) }}”
ouput:
But i want display only 08:54:27
plz help me.
value_template: "{{ as_timestamp(state_attr('device_tracker.life360_me', 'last_seen')) | timestamp_custom('%H:%M:%S') }}"
@pnbruckner have you thought about adding in a new service to call for an updated location for a tracker?
No. It’s a polled design, and even then it will only update the device_tracker entities when the Life360 server provides new data. Unless I’m misunderstanding your question.
yea sorry, I meant like creating a callable service that will send a POST to life360 to call an update for that device.
The Life360 API is undocumented. This integration is based on some work that was done in the open source community and I don’t know how they found out what they did. I have no way to know how to do anything other than poll the server. If there’s a way to do something like you suggest I have no way to know how, or how to find out.
Here is the POST call:
https://www.life360.com/v3/circles/{{CIRCLE_ID}}/members/{{MEMBER_ID}}/request
Form Data:
type: location
EDIT:
Make sure to include the Authorization
header that as the Bearer token…
I’ll have to give that a try. Can I ask, where did you find out about that URL? I have yet to find where the API is documented.
Found it just using developer tools on the browser. Using the network tab. i can give you a more in-depth overview how it works.
Hi All!
How can I change the friendly names for good. Right now all members show in the Lovelace UI badges with “life360_name”. If I change in Developer tools -> States -> Entity -> device_tracker.life360_XXXX the friendly name to what I want and click “Set state” It will change the friendly name for the moment, but after HA restart it gets back to “life360_name”.
Using the function on the states page only changes the value written to the State Machine. It doesn’t change the entity itself. (I believe it even says so.)
You need to edit known_devices.yaml in your config directory. Change the value after name:
.