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

New scanner device tracker and ZHA device tracker support #24584

Merged
merged 19 commits into from Jul 4, 2019

Conversation

@dmulcahey
Copy link
Contributor

commented Jun 17, 2019

Description:

This PR adds support for device trackers to ZHA. Tested with: SmartThings arrival sensor

I still need to add tests but I wanted to get a draft pr open to collect feedback.

A new scanner entity device tracker class has been added. It should be used for config entry platforms that implement scanner based device tracking, eg routers. This is part of home-assistant/architecture#151.

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][dev-checklist]
@ghost

This comment has been minimized.

Copy link

commented Jun 17, 2019

Hey there @Adminiuga, mind taking a look at this pull request as its been labeled with a integration (zha) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@dmulcahey dmulcahey force-pushed the dmulcahey:dm/zha-device-tracker branch 3 times, most recently from 2d12f96 to 85a6143 Jun 22, 2019

@dmulcahey dmulcahey force-pushed the dmulcahey:dm/zha-device-tracker branch from 85a6143 to 2130823 Jul 2, 2019

@dmulcahey dmulcahey marked this pull request as ready for review Jul 3, 2019

@dmulcahey dmulcahey requested a review from robbiet480 as a code owner Jul 3, 2019

@dmulcahey

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2019

@MartinHjelmare @Kane610 tests added for the ZHA tracker implementation. Anything else needed here or are we good to go?

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 3, 2019

Looks good!

We should probably add some tests for the new device tracker entity, besides the zha tests.

@dmulcahey

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2019

It doesn’t really do anything... but I can do that :) I’ll add a few for it later today. Thanks for the quick reply.

dmulcahey added some commits Jun 16, 2019

Revert "review comments"
This reverts commit 2130823.

dmulcahey and others added some commits Jul 2, 2019

Update homeassistant/components/device_tracker/config_entry.py
Review comment

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

@dmulcahey dmulcahey force-pushed the dmulcahey:dm/zha-device-tracker branch from 121cdfd to 0f0e3b0 Jul 3, 2019

dmulcahey added some commits Jul 3, 2019

@dmulcahey

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2019

@MartinHjelmare tests added for the entities I added

@MartinHjelmare
Copy link
Member

left a comment

Awesome!

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

It would be good to update the developer docs and add an entry about device_tracker under entities architecture. I'm mentioning it so we don't forget.

I'll merge here now.

@MartinHjelmare MartinHjelmare changed the title ZHA device tracker support New scanner device tracker and ZHA device tracker support Jul 4, 2019

@MartinHjelmare MartinHjelmare merged commit 3c48792 into home-assistant:dev Jul 4, 2019

10 checks passed

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
@dmulcahey

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

What do you want updated?

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

We should add a page for device_tracker like for the other entity platforms eg:
https://developers.home-assistant.io/docs/en/next/entity_light.html

We should document both the TrackerEntity and the ScannerEntity.

We need to point out that currently the new entity device trackers are only supported for config entry platforms.

mxworm added a commit to mxworm/home-assistant that referenced this pull request Jul 6, 2019

Merge branch 'dev' into current
* dev:
  Batch of Component(s) -> Integration(s) (home-assistant#24972)
  Fix monitoring of trays in syncthru component (home-assistant#24961)
  Implement ADR0003 for Netatmo sensor (home-assistant#24944)
  Update pyHik library to 0.2.3 (home-assistant#24957)
  Allow updating of via_device in device registry (home-assistant#24921)
  New scanner device tracker and ZHA device tracker support (home-assistant#24584)
  Fix exclusion of routes with excl_filter (home-assistant#24928)
  Add support for Yale YRL256 lock (home-assistant#24932)
  Update pysonos to 0.0.19 (home-assistant#24930)
  Bump androidtv to 0.0.18 (home-assistant#24927)
  Remove ZHA device entity (home-assistant#24909)
  New languages that looks like supported by Google but not documented: (home-assistant#24881)
  Fix home coach discovery (home-assistant#24902)
@balloob balloob referenced this pull request Jul 17, 2019

@dmulcahey dmulcahey deleted the dmulcahey:dm/zha-device-tracker branch Jul 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.