Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Life360 integration #24227

Merged
merged 1 commit into from Jun 6, 2019

Conversation

@pnbruckner
Copy link
Contributor

commented May 31, 2019

Description:

Life360 integration.

Note: This is "take 2." The original proposal can be found in #23405.

Related issue (if applicable): N/A

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9539

Example entry for configuration.yaml (if applicable):

life360:
  - username: LIFE360_USERNAME
    password: LIFE360_PASSWORD

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.
@pnbruckner pnbruckner referenced this pull request May 31, 2019
2 of 2 tasks complete

@pnbruckner pnbruckner changed the title Life360 integration WIP: Life360 integration Jun 3, 2019

@pnbruckner

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

I realized, for multiple Life360 accounts, only one device_tracker scanner should be created which iterates over the accounts (and circles and members) so that each unique member is only updated once, no matter what circles and accounts it is accessible from. Also, it's still unclear whether or not config flow should be used.

@pnbruckner pnbruckner force-pushed the pnbruckner:life360-take2 branch from 38df1e4 to 713f057 Jun 5, 2019

@pnbruckner

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

I did end up using config entries and adding config flow. Life360 accounts can now be entered either via the configuration, the UI, or both. CONFIG_SCHEMA now accepts a single dictionary as opposed to a list so that there is only one configuration that affects all accounts instead of allowing each account to have a different config. (Which makes sense since there is now only one scanner that processes all accounts.) Also added a new 'accounts' key which is optional and can have a list of username/password pairs. Doc PR updated accordingly.

Should now be ready for review.

FYI, after a discussion with balloob, I will look into converting to the new device_tracker entity scheme in a follow-up PR.

@pnbruckner pnbruckner changed the title WIP: Life360 integration Life360 integration Jun 5, 2019

@balloob

balloob approved these changes Jun 6, 2019

@balloob balloob merged commit 1c13638 into home-assistant:dev Jun 6, 2019

14 checks passed

build Workflow: build
Details
ci/circleci: pre-install-all-requirements Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: pre-test 3.7 Your tests passed on CircleCI!
Details
ci/circleci: pylint Your tests passed on CircleCI!
Details
ci/circleci: static-check Your tests passed on CircleCI!
Details
ci/circleci: test 3.5.5 Your tests passed on CircleCI!
Details
ci/circleci: test 3.6 Your tests passed on CircleCI!
Details
ci/circleci: test 3.7 Your tests passed on CircleCI!
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing fbfaa41...713f057
Details
codecov/project 94.2% (target 90%)
Details
home-assistant Build #20190605.3 succeeded
Details
@balloob

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

This looks great, great work ! Thanks. 🐬

@chiefcomm

This comment has been minimized.

Copy link

commented Jun 23, 2019

@pnbrunker thanks so much for working towards integration with release 0.95.0. I've assumed it's going to be released and jumped onto 0.95.0b1 with no sucess.

I've read everything I can find Is there more documentation available other than that contained above - my configuration is throwing errors.

configuration .yaml

life360:
  - username: LIFE360_USERNAME
    password: LIFE360_PASSWORD

log error

Invalid config for [life360]: expected a dictionary for dictionary value @ data['life360']. Got [OrderedDict([('username', '<redacted>'), ('password', '<redacted>')])]. (See /config/configuration.yaml, line 115). Please check the docs at https://home-assistant.io/components/life360/
@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jun 23, 2019

Please open an issue if you suspect a bug. If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels

Merged PRs should not be used for support or bug reports. Thanks!

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Jun 23, 2019

@balloob balloob removed the new-platform label Jun 25, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.