Add support for ZHA door locks #2#24344
Add support for ZHA door locks #2#24344Adminiuga merged 9 commits intohome-assistant:devfrom presslab-us:zha-implement-closure
Conversation
This allows for return values other than result[1]
|
Hey there @dmulcahey, @Adminiuga, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
Adminiuga
left a comment
There was a problem hiding this comment.
Looks good on my side.
@dmulcahey would you want 6ac908b as a separte PR?
|
@Adminiuga thanks for the review. It looks like zigpy `t.Optional' has broken the tests. How do you recommend I fix that? I mean I guess it should have still worked because it's "optional" but the type is different so the test fails. |
third param of a I'm personally (cause that how I learnt it from and since no args were given to command, no *args to check. HA tests should not be concerned that Also, specifically for this case IMO it is better to mock the |
Great, thanks for your help. Yes this is working fine. If you are okay with just doing that I will commit these changes.
This seems like a bigger change to how the ZHA tests are done, probably should be a different pull request at least? |
|
While I do appreciate the tests, they certainly make for better code. But man they take hours to run and are so cumbersome to use. And while I did figure out how to run a limited test it seems that it doesn't really catch things. Is it even possible to run codecov locally? |
|
@Adminiuga I am ok with it in 1 PR... I just want to poke through things once to make sure there aren't other wrapped command calls that need to be updated. I'll try to get to that today. @presslab-us Thanks a bunch for the contribution. This is going to make a lot of folks happy! |
|
Thanks @dmulcahey. This codecov thing is killing me, I guess the other tests were grandfathered in. |
|
@presslab-us Don't sweat the patch failure. We got permission to ignore it. |
|
Thanks, guys! |
|
@presslab-us Does the zha component description/documentation in zha.markdown need updating? https://www.home-assistant.io/components/zha/ Compare to zwave component description/documentation: |
|
@Hedda Something needed other than this pull request? home-assistant/home-assistant.io#9522 |
* Add support for DoorLock cluster * Add test for zha lock * Change lock_state report to REPORT_CONFIG_IMMEDIATE * Update channel command wrapper to return the entire result This allows for return values other than result[1] * Fix tests * Fix lint * Update DoorLock test to work with updated zigpy schema * Fix lint * Fix unlock test
Description:
Adds support for ZHA door locks. Supports lock and unlock.
This is my second try, maybe it will work this time. Last try is here: #24126
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9522
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: