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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing MQTT lock.open #60022
Add missing MQTT lock.open #60022
Conversation
Hey there @emontnemery, mind taking a look at this pull request as it has been labeled with an integration ( |
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.
Thanks for picking this up, this is indeed a welcome addition!
I think you've covered most of the remarks here: #48008 (comment), but the lock base component still has no STATE_OPEN
so:
- I don't think there's a point in defining a "CONF_STATE_OPEN" configuration option as we can't represent that state in Home Assistant anyway; the lock is either locked or unlocked
- The tests are trying to import
STATE_OPEN
fromhomeassistant.components.lock
which doesn't exist
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
It is true that the lock itself can only be locked or unlocked. Since Home Assistant unfortunately can't represent the open state for locks I'm ok by taking it out. I think it already helps most users if, in addition to lock and unlock the opening command can be sent. |
@Hypnos3 I'm not saying that it's correct or not correct to have an "open" state for You can open an architecture discussion proposing to add an "open" state. Another way would be model a lockable door as a device with a |
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.
Looks good, but some lint issues needed fixing
Please open a PR updating the documentation: https://www.home-assistant.io/integrations/lock.mqtt/ |
documentation change pull request is this: home-assistant/home-assistant.io#20439 |
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.
Thanks, @Hypnos3 馃憤
Proposed change
Add support for lock.open to MQTT lock.
Base component documentation: https://developers.home-assistant.io/docs/core/entity/lock#open
Feature request: https://community.home-assistant.io/t/mqtt-lock-open/232823
next try of implementing: #48008
Type of change
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: