-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Allow Switchbot users to force nightlatch #124326
Allow Switchbot users to force nightlatch #124326
Conversation
Hey there @Danielhiversen, @RenierM26, @murtas, @Eloston, @dsypniewski, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
I made the new option available only for lock pro entries. |
be85e29
to
bbbc8bf
Compare
Can you elaborate on this? What is needed to fix this in the first place? |
There is a difference between the old lock, which have one bit in ADV indicating lock is configured with nightlatch functionality. This is no longer the case in the new lock pro model, we firstly believed the bit is still there but after some time we discoverer is no longer there. Because there is practically no documentation for switchbot ble api there is a need for reverse engineer new way to detect if lock is configured to support this. |
bbbc8bf
to
454827a
Compare
As a owner of a SwitchBot Lock Pro and that manually applied this PR, I can confirm that it works fine and is very much needed. Without it, there is no way to unlock the door without opening it, or to open an unlocked door with the deadbolt unlocked when the lock is in "night latch" mode. |
Isn't it possible to set it always to True for those models? |
No, because then users which are not using this feature will need to unlock their doors with open call instead of unlock, and the unlock call will cause lock to partially unlock and then lock back. |
Would be really great if this makes it into .9.0 together with the updated pyswitchbot version. |
* Add option to force nightlatch operation mode * Fix format * Make the new option available only for lock pro entry * use senor_type instead of switchbot model + tests * Update homeassistant/components/switchbot/lock.py --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Breaking change
Proposed change
Adds boolean option to force lock to operate as if night latch was detected. This is easiest way I found around the broken night latch detection in pySwitchbot library for the new Lock Pro. It will be easily removable if someone found way to correctly detect night latch.
Type of change
Additional information
We currently don't know how to fix night latch detection on Lock Pro. So i decided to crate this PR which simply allow users force night latch operation (enables action OPEN).
Links for discussions around this issue:
sblibs/pySwitchbot#245
sblibs/pySwitchbot#233
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: