Rework Mikrotik device scanning following Unifi#27484
Conversation
|
@MartinHjelmare I made a new pull request because I somehow messed up the commits in the previous one (#27093) . I have improved the device scanning algorithm and added tests. |
|
Hi @MartinHjelmare , any chance you can look at this PR and let me know your comments. |
|
Sorry, this week is busy for me. I'll try to find some time. |
|
Testing this Mikrotik integration for about a week now. Two concerns:
|
Can you provide more details: |
I am testing with wireless devices.
This one cleared up by itself. It is possible I had an inconsistent wifi connection. Sorry, my bad. |
|
@velaar , Thanks for the feedback and testing. Updating disabled entities can be fixed I will update the code. |
|
@engrbm87 scanning functionality works as expected for me. Thank you for fixing the disabled entities. Wish there was an easy way of managing entities but this is obviously out of scope for this integration. |
ًWhat do you mean "easy way"? |
|
Hello @balloob . For this PR I am setting the system option |
|
@engrbm87 Could you please rebase this PR? |
…me-assistant into mikortik-integration
|
The coverage is below 95% in the device tracker and hub modules. It's ok to exclude these from coverage calculation for now. https://codecov.io/gh/home-assistant/home-assistant/pull/27484/diff |
MartinHjelmare
left a comment
There was a problem hiding this comment.
See the hue config flow tests for good examples of config flow tests.
|
Is this a breaking change? It's not clear from the breaking change paragraph. |
|
@MartinHjelmare Yes, it is. |
|
@engrbm87 please update the breaking change paragraph to mention what is breaking and what the user needs to do to cope with the breaking change. |
Breaking Change:
Mikrotik Integration can now be configured through config flow. It also supports importing from
configuration.yaml(refer to the docs to update your configuration). Mikrotik integration now uses the entity registry for managing devices (known_devices.yamlwill not be used anymore).Description:
capsmanorwirelessinterface is detected it will scan it and add/update devices status automatically. Otherwise it will fallback to DHCP list as source of devices.awayif not detected after the set period. (Default: 300 seconds)Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#11927
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.If the code does not interact with devices: