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

Split locative to a separate component #19964

Merged
merged 3 commits into from Jan 11, 2019

Conversation

Projects
None yet
4 participants
@rohankapoorcom
Copy link
Member

rohankapoorcom commented Jan 11, 2019

Description:

Splits the locative device tracker to be a component in addition to the device_tracker platform. This is required to migrate it over to use the webhook.

Breaking Change: The locative device_tracker platform no longer takes any configuration. The configuration needs to be applied to the component locative instead. The platform will be automatically loaded with the component and should not be specified in configuration.yaml.

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

locative:

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.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@rohankapoorcom

This comment has been minimized.

Copy link
Member Author

rohankapoorcom commented Jan 11, 2019

I'm thinking this is what is causing the build to break but not sure how to fix it:

ERROR:homeassistant.components.device_tracker:Unable to load /home/travis/build/home-assistant/home-assistant/tests/testing_config/known_devices.yaml: Config file not found: /home/travis/build/home-assistant/home-assistant/tests/testing_config/known_devices.yaml
@rohankapoorcom

This comment has been minimized.

Copy link
Member Author

rohankapoorcom commented Jan 11, 2019

I'm thinking this is what is causing the build to break but not sure how to fix it:

ERROR:homeassistant.components.device_tracker:Unable to load /home/travis/build/home-assistant/home-assistant/tests/testing_config/known_devices.yaml: Config file not found: /home/travis/build/home-assistant/home-assistant/tests/testing_config/known_devices.yaml

I figured it out - I was missing a fixture:

@pytest.fixture(autouse=True)
def mock_dev_track(mock_device_tracker_conf):
    """Mock device tracker config loading."""
    pass

Test should succeed now.

@balloob
Copy link
Member

balloob left a comment

I wonder how many people even use this as it's no longer maintained https://github.com/LocativeHQ

@balloob balloob merged commit d820efc into home-assistant:dev Jan 11, 2019

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 93.042%
Details

@wafflebot wafflebot bot removed the in progress label Jan 11, 2019

@rohankapoorcom

This comment has been minimized.

Copy link
Member Author

rohankapoorcom commented Jan 12, 2019

Not sure, do we have any statistics on usage by component?

@rohankapoorcom rohankapoorcom deleted the rohankapoorcom:locative-component branch Jan 12, 2019

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Jan 12, 2019

Please make an update to the docs and link a docs PR here.

@rohankapoorcom

This comment has been minimized.

Copy link
Member Author

rohankapoorcom commented Jan 12, 2019

Yep, that was coming, wasn't expecting this to get merged in already :) I'll get it up tomorrow

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

Merge branch 'dev' into current
* dev: (150 commits)
  Update coveragerc file
  Upgrade greeneye_monitor to 1.0 (home-assistant#19631)
  Update doorbird events to include URLs on event_data (home-assistant#19262)
  Support for html5 notifications to suggest their names (home-assistant#19965)
  catch TypeError's in addition to ValueError's for unifi direct device tracker (home-assistant#19994)
  'latest_dir' referenced before assignment (home-assistant#19952)
  Repackage ZHA component (home-assistant#19989)
  Add support for HomeKit Controller Locks (home-assistant#19867)
  Don't set friendly_name in Zha entity. (home-assistant#19991)
  Lint
  Wink: Update pubnubsub-handler version to make it compatible with python 3.7 (home-assistant#19625)
  Upgrade pytest-cov to 2.6.1 (home-assistant#19988)
  Upgrade huawei-lte-api to 1.1.3 (home-assistant#19987)
  Support for multiple Fibaro gateways (home-assistant#19705)
  Split locative to a separate component (home-assistant#19964)
  Bumped version to 0.86.0.dev0
  Fix fail2ban tests
  Expose more information about shipments by PostNL (home-assistant#18334)
  Fix the anthemav component by removing a debugging line. (home-assistant#19979)
  Add support for 'via_hub' for device_info (home-assistant#19454)
  ...

# Conflicts:
#	homeassistant/components/homematicip_cloud/__init__.py
#	requirements_all.txt
#	requirements_test_all.txt
@rohankapoorcom

This comment has been minimized.

Copy link
Member Author

rohankapoorcom commented Jan 13, 2019

@MartinHjelmare docs added

@balloob balloob removed the new-platform label Jan 21, 2019

@balloob balloob referenced this pull request Jan 23, 2019

Merged

0.86.0 #20354

alandtse added a commit to alandtse/home-assistant that referenced this pull request Feb 12, 2019

Split locative to a separate component (home-assistant#19964)
* Split locative to a separate component

* Switch tests to use constants for http codes

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment