To get started, create a custom_sentences/<language> directory in your Home Assistant config directory where <language> is the language code of your language, such as en for English. These YAML files are automatically merged, and may contain intents, lists, or expansion rules.
Good day. Tell me I’m doing a Conversation according to this instruction, but when I add intent_script to the configuration file, I get an error that’s on the screenshot.
What I can see from the screenshot (which should have been properly formatted text using ) - you might want to change the double quotes (") inside states("sensor .. to single quotes, so it reads
text: "It is currently {{ states('sensors.out_sensors_humidity') }} percent humidity outside."
I get the same error “Oops, an error has occurred” . I have created a yaml file in the config/custom_sentences/en directory. UPDATE - Error Resolved: The issue was that I had Google Assistant enabled. It is interesting to note that all the Home-assistant ‘built-in’ sentences work just fine with Google Assistant enabled.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:162
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 2:02:55 PM (1 occurrences)
Last logged: 2:02:55 PM
[547359747584] Error handling message: Unknown intent BasementMusicRoutine (unknown_error) Home from 192.168.1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36)
I don’t believe that the execution actually gets to the intent script, but for completeness the following script_intent code is in my configuration.yaml file:
I went into Settings → Integrations → Google Assistant and selected the Disable option from the three dot menu (lower right). Of course then you can’t use Google Assistant to talk to Home-assistant.
Update: I have since re-enabled Google Assistant. I now tried my custom sentences and they work. I was pretty sure that I tried restarting HA (one of the first things to try) when getting custom sentences to work, but that was not the case. Oops. The only thing that is required to solve the the stated error is restarting HA. A quick reload of the all YAML configurations does not solve the problem.