Chinese Course: https://www.hachina.io/docs/2073.html
English Web tutorial: https://www.home-assistant.io/components/conversation/
The session component allows you to talk to your home assistant. You can talk by pressing the microphone in the front end (only supported browsers (no iOS)) or by conversation/process
using transcription text to invoke the service .
1 Practice
Adding in the configuration file
# allows issue voice commands from the frontend in enabled browsers# intent to generate components, matching syntax rules after generating corresponding intent conversation: intents: # Intent type (name), and corresponding syntax matching rules Openlight: -open {Item} Light -turn {item} light on closelight: -close {Item} Light -off {item} lamp # Intent to execute component, Execute command intent_script: # Intent Type (name) openlight: # Speech return speech: text: Opened {item }} lamp # Execute action : service:light.turn_on data_template: entity_id: > {% if item== "Bedroom"%} light.test2_rgb_mqtt {% endif%} closelight: speech: text: Closed {{item}} light Action: service:light.turn_off data_template: entity_id: > {% if item== "bedroom"%} Light.test2_rgb_mqtt {% endif%}
Restarting the Hass makes the configuration available
or directly reload the configuration
2 Call this service
Should have clicked on the Google browser under the Voice input button, press after what you said, but my voice has been shown no input
The second kind of test that calls this service directly
"Conversation.process Service"
The conversation component registers the service conversation.process in the system. The information format accepted by Conversation.process is:
{"text":"输入的自然语言"}
And then I'm going to go to Mqtt. The topic found on and off, perfect
Now to figure out, Google's web voice input why not
and mixed the sockets into the lights.
2 Extensions
(4) Homeassistant language control