I’m trying to work out how to use custom intents, so have started out on what I thought would be an easy one. Seems I under estimated.
I have created my sentences file, /sentenses/en/Jarvis.yaml
language: "en"
intents:
JarvisTVStatus:
data:
- sentences:
- "Jarvis, is the TV on?"
- "Tell me if the television is on"
- "Check the status of the TV"
- "What's the TV doing"
- "Is someone watching the TV"
- "What is the status of the TV"
My intent_script.yaml looks like this.
intent_script:
JarvisTVStatus:
speech:
text: >
{% set tv = states('media_player.sony_xr_50x90s') %}
{% if tv == 'on' %}
Yes sir, the TV is currently on and probably showing something you don’t want to admit watching.
{% elif tv == 'off' %}
No, the TV is off. All is quiet... for now.
{% else %}
Hmm, I can't seem to tell. Perhaps the TV is sulking again.
{% endif %}
Running a debug I’m getting the following.
init_options:
start_stage: intent
end_stage: intent
input:
text: What is the status of the TV
pipeline: 01jtpfw1429t90v4cr5xpeh975
conversation_id: null
stage: done
run:
pipeline: 01jtpfw1429t90v4cr5xpeh975
language: en
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
runner_data:
stt_binary_handler_id: null
timeout: 300
events:
- type: run-start
data:
pipeline: 01jtpfw1429t90v4cr5xpeh975
language: en
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
runner_data:
stt_binary_handler_id: null
timeout: 300
timestamp: "2025-05-11T18:16:01.840317+00:00"
- type: intent-start
data:
engine: conversation.home_assistant
language: en
intent_input: What is the status of the TV
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
device_id: null
prefer_local_intents: true
timestamp: "2025-05-11T18:16:01.840389+00:00"
- type: intent-end
data:
processed_locally: true
intent_output:
response:
speech:
plain:
speech: Sorry, I am not aware of any device called TV
extra_data: null
card: {}
language: en
response_type: error
data:
code: no_valid_targets
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
continue_conversation: false
timestamp: "2025-05-11T18:16:01.846173+00:00"
- type: run-end
data: null
timestamp: "2025-05-11T18:16:01.846276+00:00"
intent:
engine: conversation.home_assistant
language: en
intent_input: What is the status of the TV
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
device_id: null
prefer_local_intents: true
done: true
processed_locally: true
intent_output:
response:
speech:
plain:
speech: Sorry, I am not aware of any device called TV
extra_data: null
card: {}
language: en
response_type: error
data:
code: no_valid_targets
conversation_id: 01JV08Z9HFF5ADPK28X9AWCCTJ
continue_conversation: false
Can someone point me in the right direction? Where have I gone wrong, if I need to provide more information then just say.
Thanks,
Garry