Seeking assistance customizing a sentence/intent with templating
Howdy.
I have the following helpers:
input_text.countdown_date_01_name
input_datetime.countdown_date_01_date,
input_text.countdown_date_02_name
input_datetime.countdown_date_02_date
I want to add a couple more if I can get this to work
I want to be able to speak "how many days until X", where X is the value of either input_text.countdown_date_01_name or input_text.countdown_date_02_name, and have Home Assistant speak the response "there are Y days until X", where X is the value of either input_text.countdown_date_01_name or input_text.countdown_date_02_name, whichever was spoken.
I know how to determine the number of days until the date that is the value of input_datetime.countdown_date_01_date or input_datetime.countdown_date_02_date. But so far I've been unable to figure out how to configure the sentence/intent so that HA knows which one to retrieve the value of.
In config/conversations.yaml I have:
intents:
HowManyDaysUntil:
- "how many days until {countdownname}"
In config/intents/sentences/en/_cmmon.yaml I have:
Sometimes you don't need a slot list available for all intents and sentences, so you can define one locally, making it usable only in the context of the intent data (like a collection of sentences) where it was defined. For example:
language: en
intents:
AddListItem:
data:
- sentences:
- add {item} to [my] shopping list
lists:
item:
wildcard: true
This is the code in my conversations.yaml:
intents:
HowManyDaysUntil:
data:
- sentences:
- how many days until {countdownname}
lists:
countdownname:
- "this"
- "that"
Here are the only difference I see between my code and the example above:
I don't have language: en (but when I add it, I get Invalid config for 'conversation' at conversations.yaml, line 1: 'language' is an invalid option for 'conversation', check: conversation->language)
The example uses a wildcard and I'm using strings (but I'm following their other examples to have a list of strings)
However, this yaml gets Invalid config for 'conversation' at conversations.yaml, line 9: value should be a string 'conversation->intents->HowManyDaysUntil->0', got None
Perhaps I can't have intents in conversations.yaml? Or maybe not lists? I started this project by editing config/intents/sentences/en/_cmmon.yaml but that's a bad idea because an update would wipe my customizations. What's the appropriate place for me to add custom sentences/intents/responses/lists?
i'm willing to try to help you but to be honest, it is far from my limited knowledge... and i'm also not english native so i do sometimes struggle to understand some specifc docs...