Home Assistant release with the issue: 0.95.1
Last working Home Assistant release (if known): 0.94.4 (with custom component)
Operating environment (Hass.io/Docker/Windows/etc.): macos
Component/platform: https://www.home-assistant.io/components/life360/ life360
Description of problem:
I have 4 people on my life360 family, and two circles. The first circle, called 'Family', has all four of us, but the adult's location sharing is turned off. The second circle, called 'Parents', has location sharing enabled, but only two groups.
The two parents no longer have location info in HA, although this worked with the custom component.
The only logs I see are these (I redacted the GUIDs; not sure if they're private or not). The Parents below are Mike and Chaya Tova; Pesya and RIvka are the kids.
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Circle's Places: None
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Mike Miller -> life360_mike_miller: will be tracked, id=AAAAAAA
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Pesya Miller -> life360_pesya_miller: will be tracked, id=BBBBBBB
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Updating life360_pesya_miller
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Rivka Miller -> life360_rivka_miller: will be tracked, id=CCCCCCCC
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Updating life360_rivka_miller
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Chaya Tova Miller -> life360_chaya_tova_miller: will be tracked, id=DDDDDDDDD
2019-06-27 21:21:58 DEBUG (SyncWorker_3) [homeassistant.components.life360.device_tracker] Parents Circle: will be included, id=YYYYYYYY
[homeassistant.components.life360.device_tracker] Circle's Places: None
For the parents, the states look like this:
device_tracker.life360_mike_miller | not_home | source_type: null friendly_name: Mike's Phone (Life360)
(I have an entry in customize.yaml)
I enabled logging using:
logger:
default: info
logs:
homeassistant.components.life360: debug
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
life360:
accounts:
- username: !secret life360_username
password: !secret life360_password
max_gps_accuracy: 200
max_update_wait:
minutes: 45
Additional information:
@mikeage hmm, not sure how I broke that, but I'll take a look and try to fix it.
In the meantime you may need to go back to the custom integration, but you'll need to rename <config>/custom_components/life360 to <config>/custom_components/life360cc, then change your config back to what it was, but with platform: life360 changed to platform: life360cc.
Sorry for the inconvenience.
Thanks, I'll try going back. Possibly needless to say, but the title was just my guess as to what differs; I don't really see anything in the logs to prove my suspicion.
Please let me know if I can help test anything.
I think I found it. Another stupid mistake while reorganizing the code. The fix should be as simple as moving one line of code to another location. I can tell you exactly what to change if you want to try it. Would mean not having to revert your config, twice.
Sure. I'm actually looking at the code right now...
if member_id not in self._members_logged:
self._members_logged.add(member_id)
_LOGGER.debug(
'%s -> %s: will%s be tracked, id=%s', full_name,
dev_id, '' if include_member else ' NOT', member_id)
sharing = bool(int(member['features']['shareLocation']))
Are we moving the self._members_logged.add(member_id) to an if sharing:?
(that's just my guess... you probably have something better ;-) )
No, but close.
In <ha_install_dir>/homeassistant/components/life360/device_tracker.py, in the _update_members method, move this statement (from line 297):
members_updated.append(member_id)
so that it's here:
if include_member and sharing:
members_updated.append(member_id)
self._update_member(member, dev_id)
Yep, that's better :-)
And it works. Thank you!
Great. I'll submit the fix soon.