Hi Everyone,
This is my first time posting, and I am fairly new to home assistant. I have configured Alexa to work with home assistant, and my goal right now is to have Alexa lock/unlock (especially lock) my doors using home assistant. I was able to achieve this if I gave the exact name of the door to the intent_script.yaml, but if I try to use custom_sentence with a list, it doesn’t get anywhere.
What works:
LockDoor:
action:
service: "lock.lock"
data_template:
entity_id: lock.front_door_lock
speech:
text: "I locked the {{ lock }} door"
UnlockDoor:
action:
service: "lock.unlock"
data:
entity_id: lock.front_door_lock
speech:
text: "I unlocked the {{ lock }} door"
On Alexa Developer side, I don’t create a slot at all, and it can successfully lock and unlock that door, but my goal is to provide it a Slot and not have a separate intent for each lock.
What I am trying:
intent_script.yaml:
LockDoor:
action:
service: "lock.lock"
data_template:
entity_id: "{{ lock }}"
speech:
text: "I locked the {{ lock }} door"
UnlockDoor:
action:
service: "lock.unlock"
data:
entity_id: "{{ lock }}"
speech:
text: "I unlocked the {{ lock }} door"
customer_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: "front"
out: "lock.front_door_lock"
- in: "patio"
out: "lock.patio_door_2"
- in: "garage"
out: "lock.garage_door_3"
On Alexa side I added a “lock” slot of type Amazon.SearchQuery
When I give the command to Alexa I get back:
Invalid slot information received for this intent.
On Home Assistant logs I see:
Error:
Received invalid slot data from Alexa: Received invalid slot info for LockDoor
Warning:
Received invalid slot info for LockDoor: not a valid value for dictionary value @ data[‘entity_id’]
I am sure something is not configured right, but I really can’t seem to figure it out.