-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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
Add open action to template lock entity #116888
Conversation
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.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
This comment was marked as off-topic.
This comment was marked as off-topic.
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 there @TiHiNi 👋
It seems like a merge conflict appeared on this PR. Could you take a look?
Thanks! 👍
../Frenck
Hey @frenck, Tim |
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.
The tests need some more work
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.
Please add a test where the state template return open
.
{ | ||
lock.DOMAIN: { | ||
**OPTIMISTIC_LOCK_CONFIG_WITH_OPEN, | ||
"value_template": "{{ states.switch.test_state.state }}", |
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.
Please test also optimistic case
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Proposed change
Add
open
action to thelock
entity of thetemplate
componentType of change
Additional information
The existing
lock
entity of thetemplate
component supports only the actionlock
andunlock
of theLockEntity
. This PR adds the possibility to use optionally theopen
action.If the lock template yaml configuration has an
open
action theopen
feature will be added to the entity.Motivation is from: https://community.home-assistant.io/t/how-to-use-lock-behavior-improvements/720736/7
The test is extended, too. But I'm new to Python and new to HA contributing, so let me know if things are missing.
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
Update lock.template.markdown with open action home-assistant.io#32600
If the code communicates with devices, web services, or third-party tools: NO
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: