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

Add Mikrotik hub and rework device tracker #25664

Merged
merged 42 commits into from Aug 8, 2019

Conversation

@slackr31337
Copy link
Contributor

commented Aug 2, 2019

Breaking Change:

The Mikrotik device tracker integration is now a component (hub) with a device tracker platform. If you have a device_tracker section where mikrotik is a platform in your configuration.yaml you will need to move it to the hub config section for mikrotik and make sure you follow the new config format.

Description:

Moved Mikrotik API code into a hub, rework device tracker to use hub.

Updated documentation. PR home-assistant/home-assistant.io#10044

Example entry for configuration.yaml (if applicable):

mikrotik:
  - host: 192.168.88.1
    username: !secret router_user
    password: !secret router_pass
    ssl: true

  - host: 192.168.88.2
    username: !secret capsman_user
    password: !secret capsman_pass
    ssl: true

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.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
slackr31337 added 3 commits Aug 2, 2019

@project-bot project-bot bot added this to Needs review in Dev Aug 2, 2019

slackr31337 added 4 commits Aug 2, 2019
@slackr31337

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2019

Hi, this PR fails the CI checks "Check black formatting" and the only thing in the log is "##[error]Bash exited with code '1'." What does that mean?

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

We have started using the black code formatter:
https://developers.home-assistant.io/blog/2019/07/31/black.html

Dev automation moved this from Needs review to Review in progress Aug 2, 2019

homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
slackr31337 added 3 commits Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

@homeassistant homeassistant added cla-signed and removed cla-recheck labels Aug 2, 2019

@project-bot project-bot bot moved this from Review in progress to Needs review in Dev Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

@home-assistant home-assistant deleted a comment from homeassistant Aug 2, 2019

slackr31337 added 7 commits Aug 5, 2019
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
slackr31337 added 5 commits Aug 7, 2019
@MartinHjelmare
Copy link
Member

left a comment

I've looked at the device tracker platform now. I'll go over the component next round.

homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/mikrotik/__init__.py Outdated Show resolved Hide resolved
slackr31337 added 3 commits Aug 7, 2019

Dev automation moved this from Review in progress to Reviewer approved Aug 8, 2019

@MartinHjelmare
Copy link
Member

left a comment

Looks good!

@MartinHjelmare MartinHjelmare merged commit 4bcef25 into home-assistant:dev Aug 8, 2019

11 checks passed

CI Build #20190807.51 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 2f7c57b...7c68d60
Details
codecov/project 94% (target 90%)
Details

Dev automation moved this from Reviewer approved to Done Aug 8, 2019

@slackr31337 slackr31337 referenced this pull request Aug 8, 2019
2 of 2 tasks complete

@lock lock bot locked and limited conversation to collaborators Aug 9, 2019

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