Hello everyone,
I’m creating an intent script to handle a custom intent which is a variation of HassTurnOn, for the light domain and a specific area. After countless tests and much research, the only way I could make it work is like this:
# custom_sentences/en/lights.yaml
language: en
intents:
HassTurnOn_LightBedroom:
data:
- sentences:
# copied all sentences from the built-in intent, hard-coding the area name.
# It would be nice to just "filter" on the area slot somehow, without copying everything,
# but I couldn't make it work.
- "<turn_on> [<all>] [<the>] <light> [(<of>|<in>)]bedroom"
- "<turn_on> [<in>]bedroom [<all>] [<the>] <light>"
- "[<in>]bedroom [<all>] [<the>] <light> <turn_on>"
- "[<in>]bedroom <turn_on> [<all>] [<the>] <light>"
slots:
domain: light
# actual intent script code
intent_script:
HassTurnOn_LightBedroom:
action:
- action: script.my_custom_script
speech:
text: "Turned on the light in bedroom"
I would like to return the built-in response text from the built-in HassTurnOn lights intent (this one, possibly referring to it by its key lights_area). I couldn’t find a way of doing it without maybe resorting to some Python code (accessing HA API).
Thanks!