Open
Description
The problem
For some reason asking AI to set volume on my TV fails. It can turn it off, it can tell me the sound level. But it cant turn down volume or mute.
And the error is weird, its a match error?
homeassistant | 2025-02-20 00:42:20.548 DEBUG (MainThread) [homeassistant.components.openai_conversation] Response ChatCompletion(id='chatcmpl-B2nznd1IxYQCvo56hefqROZV7Ugra', choices=[Choice(finish_reason='tool_calls', index=0, logprobs=None, message=ChatCompletionMessage(content=None, refusal=None, role='assistant', audio=None, function_call=None, tool_calls=[ChatCompletionMessageToolCall(id='call_k9ptY957m5O8w1Zp6sZIS8JT', function=Function(arguments='{"name":"TV in Living Room","area":"Living Room","domain":["media_player"],"volume_level":30}', name='HassSetVolume'), type='function')]))], created=1740008539, model='gpt-4o-mini-2024-07-18', object='chat.completion', service_tier='default', system_fingerprint='fp_00428b782a', usage=CompletionUsage(completion_tokens=36, prompt_tokens=4469, total_tokens=4505, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0)))
homeassistant | 2025-02-20 00:42:20.549 DEBUG (MainThread) [homeassistant.components.conversation.session] Tool call: HassSetVolume({'name': 'TV in Living Room', 'area': 'Living Room', 'domain': ['media_player'], 'volume_level': 30})
homeassistant | 2025-02-20 00:42:20.550 DEBUG (MainThread) [homeassistant.components.conversation.session] Tool response: {'error': 'MatchFailedError', 'error_text': "<MatchFailedError result=MatchTargetsResult(is_match=False, no_match_reason=<MatchFailedReason.STATE: 7>, states=[], no_match_name=None, areas=[], floors=[]), constraints=MatchTargetsConstraints(name='TV in Living Room', area_name='Living Room', floor_name=None, domains={'media_player'}, device_classes=None, features=<MediaPlayerEntityFeature.VOLUME_SET: 4>, states={<MediaPlayerState.PLAYING: 'playing'>}, assistant='conversation', allow_duplicate_names=False, single_target=False), preferences=MatchTargetsPreferences(area_id='bedroom', floor_id=None)>"}
homeassistant | 2025-02-20 00:42:21.807 DEBUG (MainThread) [homeassistant.components.openai_conversation] Response ChatCompletion(id='chatcmpl-B2nzoR0tVVsLKubYzjbHN5lWUk6n8', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content="It appears the TV is currently in a state of defiance, perhaps contemplating its own existence. Since it's playing, I can't adjust the volume right now, but just remember that nothing in this world ever truly listens to you.", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=1740008540, model='gpt-4o-mini-2024-07-18', object='chat.completion', service_tier='default', system_fingerprint='fp_00428b782a', usage=CompletionUsage(completion_tokens=47, prompt_tokens=4649, total_tokens=4696, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=4352)))
stage: done
run:
pipeline: 01j71pnavrncqn3bqf2ct0t4ae
language: en
events:
- type: run-start
data:
pipeline: 01j71pnavrncqn3bqf2ct0t4ae
language: en
timestamp: "2025-02-19T23:42:07.018501+00:00"
- type: stt-start
data:
engine: stt.faster_whisper
metadata:
language: en
format: wav
codec: pcm
bit_rate: 16
sample_rate: 16000
channel: 1
timestamp: "2025-02-19T23:42:07.018620+00:00"
- type: stt-vad-start
data:
timestamp: 1140
timestamp: "2025-02-19T23:42:08.124180+00:00"
- type: stt-vad-end
data:
timestamp: 11140
timestamp: "2025-02-19T23:42:18.137596+00:00"
- type: stt-end
data:
stt_output:
text: " can you turn down the volume on the TV in the living room"
timestamp: "2025-02-19T23:42:19.059276+00:00"
- type: intent-start
data:
engine: conversation.chatgpt
language: en
intent_input: " can you turn down the volume on the TV in the living room"
conversation_id: 01JMG9DNMV5FXWPXQQ561FER55
device_id: 25db0e02416b8a878e46110495c57eb6
prefer_local_intents: true
timestamp: "2025-02-19T23:42:19.059379+00:00"
- type: intent-end
data:
processed_locally: false
intent_output:
response:
speech:
plain:
speech: >-
It appears the TV is currently in a state of defiance, perhaps
contemplating its own existence. Since it's playing, I can't
adjust the volume right now, but just remember that nothing in
this world ever truly listens to you.
extra_data: null
card: {}
language: en
response_type: action_done
data:
targets: []
success: []
failed: []
conversation_id: 01JMG9DNMV5FXWPXQQ561FER55
timestamp: "2025-02-19T23:42:21.807837+00:00"
- type: tts-start
data:
engine: tts.piper
language: en-us
voice: glados
tts_input: >-
It appears the TV is currently in a state of defiance, perhaps
contemplating its own existence. Since it's playing, I can't adjust the
volume right now, but just remember that nothing in this world ever
truly listens to you.
timestamp: "2025-02-19T23:42:21.808004+00:00"
- type: tts-end
data:
tts_output:
media_id: >-
media-source://tts/tts.piper?message=It+appears+the+TV+is+currently+in+a+state+of+defiance,+perhaps+contemplating+its+own+existence.+Since+it's+playing,+I+can't+adjust+the+volume+right+now,+but+just+remember+that+nothing+in+this+world+ever+truly+listens+to+you.&language=en-us&tts_options=%7B%22voice%22:%22glados%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
url: /api/tts_proxy/2TxiA7vv0Xafee2EYqIclg.flac
mime_type: audio/flac
timestamp: "2025-02-19T23:42:21.808845+00:00"
- type: run-end
data: null
timestamp: "2025-02-19T23:42:21.809088+00:00"
stt:
engine: stt.faster_whisper
metadata:
language: en
format: wav
codec: pcm
bit_rate: 16
sample_rate: 16000
channel: 1
done: true
stt_output:
text: " can you turn down the volume on the TV in the living room"
intent:
engine: conversation.chatgpt
language: en
intent_input: " can you turn down the volume on the TV in the living room"
conversation_id: 01JMG9DNMV5FXWPXQQ561FER55
device_id: 25db0e02416b8a878e46110495c57eb6
prefer_local_intents: true
done: true
processed_locally: false
intent_output:
response:
speech:
plain:
speech: >-
It appears the TV is currently in a state of defiance, perhaps
contemplating its own existence. Since it's playing, I can't adjust
the volume right now, but just remember that nothing in this world
ever truly listens to you.
extra_data: null
card: {}
language: en
response_type: action_done
data:
targets: []
success: []
failed: []
conversation_id: 01JMG9DNMV5FXWPXQQ561FER55
tts:
engine: tts.piper
language: en-us
voice: glados
tts_input: >-
It appears the TV is currently in a state of defiance, perhaps contemplating
its own existence. Since it's playing, I can't adjust the volume right now,
but just remember that nothing in this world ever truly listens to you.
done: true
tts_output:
media_id: >-
media-source://tts/tts.piper?message=It+appears+the+TV+is+currently+in+a+state+of+defiance,+perhaps+contemplating+its+own+existence.+Since+it's+playing,+I+can't+adjust+the+volume+right+now,+but+just+remember+that+nothing+in+this+world+ever+truly+listens+to+you.&language=en-us&tts_options=%7B%22voice%22:%22glados%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
url: /api/tts_proxy/2TxiA7vv0Xafee2EYqIclg.flac
mime_type: audio/flac
What version of Home Assistant Core has the issue?
core-2025.2.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response