Intent Script examples that work?

Somewhat frustrated, searching for a comprehensive intent_script: YAML example. I would like to define my own intent (likely overriding HA’s built-in intents) with its own customized voice response. In many cases, I’d like to extend limited sentence structure for custom intents, such as: Tell me X and What is X are equivalent.

I’ve searched the forum and the web, and it seems bits and pieces are everywhere going back to 2018, but isn’t there something more up-to-date with ‘Year of Voice’ now in full swing? Apologies if I’ve missed it somewhere, but a “cookbook” style step-by-step with working examples would be much appreciated.

EDIT: After three days with no response, I’ve updated the title.

1 Like

Is this one of the possible solutions?
Don’t define an intent, just define an automation?

To add to my original post…just for fun, I made an automation who’s trigger sentence is “Who do you like?” and the only response is “Jason of course”. If you have people location setup, you could possibly respond with the name of whoever is in the room at the time too.

So not entirely sure what the OP is looking to do, but I do know just defining an automation with voice input gives you quite a bit of available customization (especially since it can respond with voice as well as regular automation stuff - your choice). If the OP is looking for just a couple one off situations, than automation would make it easy to do. If they are looking to do it in 20+ situations, that could be cumbersome (and cluttering). And if they are looking for a template to override a default keyword I’m not sure how to do that…

Actually, as a former Rhasspy user, I’d like to re-implement some of my earlier automations used with Rhasspy. My example for a “tell me the weather” or “what is the weather” speech prompt is shown below. It used the flexibility of templating to report various sensors/states. What I’d like to do is override the built-in HA intent of “tell me the weather” with my own text and phrases, as was possible previously.

- id: '0060'
  alias: TTS Weather
  trigger:
  - event_data: {}
    event_type: rhasspy_GetWeather
    platform: event
  condition: []
  action:
  - data_template:
      target: "{% if trigger.event.data._intent.siteId == \"Listener1\" %}\n    192.168.1.36\n{%
        elif trigger.event.data._intent.siteId == \"Listener2\" %}\n    192.168.1.32\n{%
        elif trigger.event.data._intent.siteId == \"Listener3\" %}\n    192.168.1.37\n{%
        endif %}"
      payload: The weather is currently {{ states.weather.downstairs.state }} The
        forecast is {{ states.weather.downstairs.attributes.forecast[0].condition
        }} The temperature is {{ state_attr('weather.downstairs','temperature') }}
        degrees The humidity is {{ state_attr('weather.downstairs','humidity') }}
        percent
    service: rest_command.rhasspy_speak

AND… I’ve just setup my two older automations to tell me the weather and tell me the time. Let’s see how HA Voice Assistant handles them… Decently. The voice assistant response tends to overrun/skip parts of the message, presumably due to the UDP nature of conversation response delivery.