Hi @jpage4500 ,
I am using this app with the built in dashboard app.
I see the device page contain a state variable for Presence:
When displaying this device on the dashboard I can display all attributes but the Presence state variable is not available for display. Can the state variable be an attribute as well?
Or am I missing another option to display its value on the dashboard?
I am finding the same thing. Presence always states Not Present, even when I am at home.
Let me check - if it's missing or incorrect than I probably messed something up because I believe the original Life360 with States supported this fine as I remember.
I'll get it fixed
Update: I'm testing a fix now
The Hubitat app will create child drivers using the name "Life360 - ". I think if those drivers already exist they won't be re-created. So, you might need to change the names if you already have drivers with the same name.
Yeah it could be. Actually I suppose that hubitat renames device if the one is already in use. I'll test later.
I just pushed a fix for this
What did the fix do? I do not see presence being reported on the HD+ tile (still shows as Not Present when I change the tile to a presence sensor)
Updated using HPM to the new version.
Still do not see the Presence as an attibute that can be displayed on the dashboard.
Also, the is something wrong with the state variable "status"
The user is not present but is 0.00 km from home
Also - does it make sence that once this app is installed the built in Life360 app stpped working?
Ok installed Life360+ beside Life360 with States.
It seems to work and it just creates new devices without breaking anything previous.
Not sure if anyone else misses these but I do:
- distanceKm : 0.0
- distanceMetric : 0.0
- distanceMiles : 0.0
Any chance to add?
I think sobyes. One of the first things the app does is cancel any current webhook calls from life 360. So makes sense this would impact the other integration.
In the driver on line 298 change:
sStatus = sprintf("%.2f", speedUnits) + " miles from Home"
to
sStatus = sprintf("%.2f", distanceUnits) + " miles from Home"
Do the same thing on line 304 for 'km from Home'.
I do see presence as an attribute that is available for the dashboard now. It does take some time from when you update the code until it showed up ..... but it is there for me now.
Yep, the next time the location/battery changes it should update
The driver fix was to set the presence attribute
I also updated HD+ a few days ago to handle the new app by default - so it'll show up as a map. But even without the update to HD+ the presence attribute should be there (or will show up)
thanks @Matthew - good catch - I'll update
I didn't like the fact that the previous app set variables for both miles and Km.. I'm just setting 1 variable distance
and 1 variable speed
and the value will be in miles or Km depending on what units you select
I didn't know what the distanceMetric
was used for.. I believe this is the value that Life360 passes though (meters) so if it's used by something I can add it back
Cool...that makes sense.
Another possible issue I see is with the HTML attribute:
Not moving at a very high speed
Hmm.. I can't tell what's wrong with this at first glance. What (if anything) did you set the Minimum 'Transit' Speed
and Minimum 'Driving' Speed
values to?
There's 2 attributes - 'inTransit' and 'isDriving' that come from Life360.. and they can be overridden by setting these driver properties.
Anyway, somehow it seems "inTransit" is "false" but "speed" is 97kM.
So did I get it right. There should be "distance" variable available? Speed is what I find but not distance.
I think there needs to be a "distance" attribute declared in the driver. I put one on line 121 and it now shows for me.
thanks again for this! I'll update the driver