Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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!

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
1 participant