I'm trying to debug why this question never seems to get an answer, here's the action from the automation :
[posting in thread as this message is too long]
When I check the debugger for voice, I can see it heard me say 'yes' but it didn't turn the kettle on (or make the accouncement that it was going to) The trace timeline for the automation just says "Choose: No action executed" Any ideas who to debug further ? thanks.
#Debugging assist_satellite.ask_question - not executing an action
1 messages · Page 1 of 1 (latest)
`- action: assist_satellite.ask_question
metadata: {}
data:
question: Its quarter to 3, shall we have tea ?
preannounce: false
entity_id: assist_satellite.xiaozhi_ball_v2_assist_satellite
answers:
- id: "yes"
sentences:
- yes please
- sure
- ok
- ok then
- id: "no"
sentences:
- not now
- no thanks
- its ok
- no no
preannounce_media_id:
media_content_id: media-source://media_source/local/jarvis_beep.mp3
media_content_type: audio/mpeg
metadata:
title: jarvis_beep.mp3
thumbnail: null
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
response_variable: response
- choose:
- conditions:
- condition: template
value_template: "{{ response.id == 'yes' }}"
sequence: - action: assist_satellite.announce
metadata: {}
data:
message: ok, kettle turned on
preannounce: false
target:
entity_id: assist_satellite.xiaozhi_ball_v2_assist_satellite - action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.kettle_start
- condition: template
- conditions:
- condition: template
value_template: "{{ response.id == 'no' }}"
sequence: - action: assist_satellite.announce
metadata: {}
data:
message: No tea for you
preannounce: false
target:
entity_id: assist_satellite.xiaozhi_ball_v2_assist_satellite`
- condition: template
- conditions:
hi @young canopy
I can help you
hmm..
could you share your project?
What do you mean by my project ? My code is pasted above
Check the trace. Probably it's not response.id. check "changed variables" tab for your first step.
Just checked my similar automation - it seems right...
I never used name "response" for response var though - don't like to use words that might be reserved by system ..
Mind renaming?
I'd looked at the trace but didn't notice he 'changed variable' tab. I can see in there :
response: id: null sentence: No. slots: {}
let me try capital N in my expected reponses
I've changed the reponse variable to 'kettle' and capitalised the expected responses but my options still don't get executed.
The problem is with that I'd: null. Not sure why though.
can you show me your code that works ? I'll try it out
actions:
- action: assist_satellite.ask_question
metadata: {}
data:
question: You didn't stand today. Want me to raise the desk now?
preannounce: true
entity_id: assist_satellite.office_koala_assist_satellite
answers:
- sentences:
- "yes"
- yeah
- sure
id: "yes"
response_variable: answer
- if:
- condition: template
value_template: "{{ answer.id == \"yes\" }}"
alias: If answered yes
then:
- action: button.press
metadata: {}
data: {}
target:
entity_id: button.office_desk_preset_2
hmm.. I wrote it again from scratch and it works, the only difference i can see really is the quotation marks around the possible answers. Here's my code :
`actions:
- action: assist_satellite.ask_question
metadata: {}
data:
question: yes or no ?
preannounce: true
entity_id: assist_satellite.xiaozhi_ball_v2_assist_satellite
answers:
- id: "yes"
sentences:
- "yes"
- "Yes"
- id: "no"
sentences:
- "No"
- "no"
response_variable: reply - choose:
- conditions:
- condition: template
value_template: "{{ reply.id == 'yes' }}"
sequence: - action: assist_satellite.announce
metadata: {}
data:
message: kettle turned on
preannounce: true
target:
entity_id: assist_satellite.xiaozhi_ball_v2_assist_satellite`
- condition: template
- conditions:
I realized that I didn't see the "yes" and "no" words in your sentences before. Maybe that's the problem?