I have assist set up, using the browser speaker and microphone, in a secure website. If I say, or type, “turn on the office lights”, assist will do so. I’m having a problem exposing my deadbolt locks to assist, however.
I went to Settings>Voice Assistants>Expose and selected lock.basement_deadbolt
. I clicked expose, then I clicked the assist icon and added an alias. This is the result:
![bolt](https://community-assets.home-assistant.io/original/4X/d/a/9/da96d89b946a62611982b01bbe0b5cf44a01857d.png)
It seems to be exposed, but on the overview page, assist gives this error when I say or type "unlock the basement deadbolt:
What have I missed?
I should add that if I ask “what is the state of the basement deadbolt”, assist will respond with the correct state. Other services, such as scripts, will lock/unlock the deadbolt.
OK, I learned that exposing the locks is not sufficient. Here are my custom sentences and intent scripts to control the (Z-wave) locks. Maybe they will be useful to someone else.
# config/custom_sentences/en/lock_unlock.yaml
language: "en"
intents:
LockDoor:
data:
- sentences:
- "lock [the] {lock} [door]"
- "lock [the] door in [the] {lock}"
UnlockDoor:
data:
- sentences:
- "unlock [the] {lock} [door]"
- "unlock [the] door in [the] {lock}"
lists:
lock:
values:
- in: "basement"
out: "lock.basement_deadbolt"
- in: "front"
out: "lock.front_deadbolt"
- in: "entrance"
out: "lock.front_deadbolt"
# intent_scripts.yaml
LockDoor:
action:
service: "lock.lock"
data:
entity_id: "{{ lock }}"
speech:
text: "I locked the {{ area_name(lock) }} door"
UnlockDoor:
action:
service: "lock.unlock"
data:
entity_id: "{{ lock }}"
speech:
text: "I unlocked the {{ area_name(lock) }} door"