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 Mill config flow #35136

Merged
merged 17 commits into from
May 10, 2020
Merged

Add Mill config flow #35136

merged 17 commits into from
May 10, 2020

Conversation

Danielhiversen
Copy link
Member

@Danielhiversen Danielhiversen commented May 3, 2020

Breaking change

Mill can no longer be configured via configuration.yaml, configuration is now done though UI

Proposed change

Add config flow support to Mill integration

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@probot-home-assistant
Copy link

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

@MartinHjelmare MartinHjelmare changed the title Mill config Add Mill config flow May 8, 2020
@@ -52,11 +49,11 @@
)

Copy link
Member

@balloob balloob May 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(comment not related to line but to file)

For a future PR, we should register the service using entity_platform.async_register_entity_service move the service registration to __init__.py and make sure it works across config entries.

@bdraco
Copy link
Member

bdraco commented May 9, 2020

Looks like just the missing coverage for line 43,44 in config_flow.py and this is ready to go.

# pytest --cov=homeassistant/components/mill/ --cov-report term-missing -- tests/components/mill/
Test session starts (platform: linux, Python 3.8.1, pytest 5.3.5, pytest-sugar 0.9.2)
rootdir: /root/home-assistant, inifile: setup.cfg
plugins: requests-mock-1.7.0, aiohttp-0.3.0, cov-2.8.1, sugar-0.9.2, timeout-1.3.3, profiling-1.7.0, parallel-0.1.0
collecting ... 
 tests/components/mill/test_config_flow.py ✓✓✓                                                                                                                                                                                                                   100% ██████████

----------- coverage: platform linux, python 3.8.1-final-0 -----------
Name                                           Stmts   Miss  Cover   Missing
----------------------------------------------------------------------------
homeassistant/components/mill/config_flow.py      26      2    92%   43-44


Results (0.65s):
       3 passed
root@ha-dev:~/home-assistant# vim homeassistant/components/mill/config_flow.py  

@bdraco
Copy link
Member

bdraco commented May 10, 2020

Nice job @Danielhiversen

@bdraco bdraco merged commit f302c6f into dev May 10, 2020
@delete-merged-branch delete-merged-branch bot deleted the mill_config branch May 10, 2020 13:44
@lock lock bot locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants