core icon indicating copy to clipboard operation
core copied to clipboard

Add Schlage integration

Open dknowles2 opened this issue 2 years ago • 6 comments

Proposed change

This adds a new integration for Schlage WiFi locks. This first PR is a bare-bones implementation of the custom integration I've been maintaining at https://github.com/dknowles2/ha-schlage/. I'll port the remaining features in subsequent PRs to make the reviews manageable.

Type of change

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

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/27585

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [x] The code has been formatted using Black (black --fast homeassistant tests)
  • [x] 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:

  • [x] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [x] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • [ ] Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

dknowles2 avatar May 30 '23 02:05 dknowles2

Once review has started, please don't force push as it makes it very hard to figure out what has changed

bdraco avatar May 30 '23 14:05 bdraco

Once review has started, please don't force push as it makes it very hard to figure out what has changed

Ack, sorry about that!

dknowles2 avatar May 31 '23 00:05 dknowles2

Ugh. Once again I seem to have tripped over git's terrible UX.

dknowles2 avatar May 31 '23 01:05 dknowles2

Ugh. Once again I seem to have tripped over git's terrible UX.

I rebased and force pushed and I think this is fixed now.

dknowles2 avatar May 31 '23 02:05 dknowles2

If there's a lot of work left here I suggest starting over in a new PR to avoid spamming all the participants that were brought in by mistake when the rebase went wrong.

MartinHjelmare avatar May 31 '23 03:05 MartinHjelmare

Traveling this weekend but will take a look when I get back home

bdraco avatar Jun 03 '23 02:06 bdraco

@bdraco friendly ping? :)

dknowles2 avatar Jun 25 '23 03:06 dknowles2

been traveling and just got back home. I'll catch up on reviews as soon as I can

bdraco avatar Jun 25 '23 03:06 bdraco

This one looks like its nearly ready to merge. There are some tiny review comments and has_entity_name needs to be set

bdraco avatar Jul 26 '23 13:07 bdraco

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Jul 26 '23 13:07 home-assistant[bot]

Is everything still working ok if you delete and re setup?

bdraco avatar Jul 27 '23 00:07 bdraco

Is everything still working ok if you delete and re setup?

Yep, seems to work.

dknowles2 avatar Jul 27 '23 01:07 dknowles2

The config flow has 100% coverage so we can merge when the CI is green.

If you don't want to add the additional coverage, please add the files to .coveragerc for the ones the ci is failing on. (Would be better to add the coverage)

bdraco avatar Jul 27 '23 01:07 bdraco

The config flow has 100% coverage so we can merge when the CI is green.

If you don't want to add the additional coverage, please add the files to .coveragerc for the ones the ci is failing on. (Would be better to add the coverage)

Should have 100% coverage now.

dknowles2 avatar Jul 27 '23 02:07 dknowles2

postgres runner test failure is unrelated.

bdraco avatar Jul 27 '23 03:07 bdraco

Thanks @dknowles2

bdraco avatar Jul 27 '23 04:07 bdraco