-
-
Notifications
You must be signed in to change notification settings - Fork 378
feat(lock): add config option to show open door button when locked #1726
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
base: main
Are you sure you want to change the base?
feat(lock): add config option to show open door button when locked #1726
Conversation
# Conflicts: # src/translations/en.json
@piitaya Is there anything you need from me to get this merged? Thanks for all the great work on these cards! |
+1 to this feature! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi 👋
Thank you for your contribution. Sorry for the late review, I was busy during the last weeks.
In HA more info, the button is always here but with a confirmation. I wonder if we should use the same pattern in the lock card instead of adding an option. What do you think?
CleanShot.2025-07-18.at.09.21.24.mp4
Hi @piitaya, No worries, thank you for all the time and effort you put into this awesome repository!
I personally think it would be fine, but I can also imagine users wanting to keep the current style where the button is only visible when unlocked. If you do think it should always be shown if supported, I will make the change. I also wanted to discuss the placement of the config option (if you decide to keep it). Should it be between Icon Type and Tap Behavior, or is the placement fine as-is? EDIT: How would you like to see the confirmation happen? I think the button will be too small for text. Thanks! |
I absolutely fafour a 2 step unlatch operation! This prevents accidentally opening your front door, i.e. when you are not at home and it would be the worst case to do so. |
+1 For the 2 steps operation! I was going to do a Feature request for that :) |
Description
This PR allows showing the "Open door" button even when the lock is locked. When the lock card was initially implemented, not allowing this seemed to have been a conscious choice. But since there are a lot of locks that do support opening the door from a locked state, it makes sense to add this.
Related Issue
This PR fixes or closes issue: closes #876
Motivation and Context
This PR implements the requested feature in #876. By making this an option, users with locks that don't support opening from the locked state can choose not to enable this.
As the
lock.open
action might leave the door ajar, some users might also find this button undesirable, as it can't be relocked without manual intervention / a (smart) door closer.How Has This Been Tested
Tested it on my own HA instance by uploading to the /config/www folder and loading the resource instead of the HACS resource. The attached screenshot is from my own instance. Disabling the switch will hide the "door open" button when locked, and it will still show (if supported) when the door is unlocked.
Types of changes
Checklist