#Tuning TV channels using custom sentences
1 messages · Page 1 of 1 (latest)
I thing that you should check this document..this can probably be done by pointing to the channel names: https://www.home-assistant.io/voice_control/custom_sentences/#setting-up-sentences-in-the-config-directory
It's also worth taking a look here for a detailed description:
https://www.home-assistant.io/integrations/intent_script/
I already did that, and it doesn't work!
intent_script:
ChangeChannel:
speech:
text: Changing the channel to {{ channel }}
action:
- service: media_player.play_media
target:
entity_id: media_player.lg_tv
data:
media_content_type: channel
media_content_id: "{{ channel }}"
intents.yaml:
intents:
ChangeChannel:
- Turn to {channel}
- Turn TV to {channel}
- Turn the TV to {channel}
- Turn the living room TV to {channel}
- Turn living room TV to {channel}
configuration.yaml:
intent_script:
ChangeChannel:
speech:
text: Changing the channel to {{ channel }}
action:
- service: media_player.play_media
target:
entity_id: media_player.lg_tv
data:
media_content_type: channel
media_content_id: "{{ channel }}"
Unexpected error during intent recognition
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1015, in recognize_intent
conversation_result = await conversation.async_converse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
File "/usr/local/lib/python3.12/site-packages/hassil/recognize.py", line 1107, in match_expression
raise MissingListError(f"Missing slot list {{{list_ref.list_name}}}")
hassil.recognize.MissingListError: Missing slot list {channel}
You need to define slot for "channel" field. Assist needs to know what's there in {channel}
That's the last thing I did in my configuration:
intent_script:
ChangeChannel:
speech:
text: Changing the channel to {channel}
action:
- service: media_player.play_media
target:
entity_id: media_player.lg_tv
data:
media_content_type: channel
media_content_id: "{channel}"
slot_lists:
channel:
- "Al Ahly"
- "Al Arabiya"
- "Al Jazeera"
- "Al Jazeera Documentary"
- "Al Jazeera English"
- "Al Jazeera Mubasher"
- "Al Masryia HD"
- "Al Oula HD"
- "Al Qahera News SD"
- "ALASKANDARIA"
- "Alhayat"
- "BBC Arabic"
- "beIN SPORTS"
- "CBC"
- "CBC Sofra"
- "CNN"
- "Dmc"
- "Dubai One HD"
- "ELMEHWAR"
- "Maspero Zaman"
- "MBC MASR"
- "MBC 2"
- "Misr Quran Kareem"
- "Mix"
- "ON E HD"
- "ONTIME SPORTS HD"
- "Rotana Cinema EGY"
- "Rotana Classic"
- "TeN TV"
conversation:
intents:
ChangeChannel:
- Turn to {channel}
- Turn TV to {channel}
- Turn the TV to {channel}
- Turn the living room TV to {channel}
- Turn living room TV to {channel}
- Change to {channel}
- Change TV to {channel}
- Change the TV to {channel}
- Change the living room TV to {channel}
- Change living room TV to {channel}
- Tune to {channel}
- Tune TV to {channel}
- Tune the TV to {channel}
- Tune the living room TV to {channel}
- Tune living room TV to {channel}
It looks incorrect. Did you do it with ChatGPT?
I actually asked it, yes
OK, can you tell me how to correct it?
As I checked the document also
I corrected it but encountered a different error: