Skip to content

Conversation

kvanzuijlen
Copy link
Contributor

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.

image

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

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 🌎 Translation (addition or update a translation)
  • ⚙️ Tech (code style improvement, performance improvement or dependencies bump)
  • 📚 Documentation (fix or addition in the documentation)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change locally.
  • I followed the steps if I add a new language .

@kvanzuijlen
Copy link
Contributor Author

@piitaya Is there anything you need from me to get this merged? Thanks for all the great work on these cards!

@davidmateos
Copy link

+1 to this feature!

Copy link
Owner

@piitaya piitaya left a 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

@kvanzuijlen
Copy link
Contributor Author

kvanzuijlen commented Jul 23, 2025

Hi @piitaya,

No worries, thank you for all the time and effort you put into this awesome repository!

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?

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!

@PulsarFX
Copy link

PulsarFX commented Aug 1, 2025

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?

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.
I can't understand why the card has a single tap to unlatch, but the details view has the far more safe double tap to unlatch.
Double tap should be absolutely the default on any unlatch button!
Imagine scrolling your HA view on a bumpy ride and your phone thinks "ah user tapped the unlatch button", and bam your front door springs open. Completely crazy.

@distante
Copy link

+1 For the 2 steps operation! I was going to do a Feature request for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The unlatch action should be available also when the lock is locked
5 participants