mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 20:36:52 +00:00
Update snips.markdown (#5293)
* Update snips.markdown Added new examples and link to discord and new documentation * Update snips.markdown * Fix formatting
This commit is contained in:
parent
8f8e2e9a3d
commit
04a3b83a53
@ -2,7 +2,7 @@
|
|||||||
layout: page
|
layout: page
|
||||||
title: "Snips"
|
title: "Snips"
|
||||||
description: "Instructions on how to integrate Snips within Home Assistant."
|
description: "Instructions on how to integrate Snips within Home Assistant."
|
||||||
date: 2017-06-22 12:00
|
date: 2018-05-02 12:00
|
||||||
sidebar: true
|
sidebar: true
|
||||||
comments: false
|
comments: false
|
||||||
sharing: true
|
sharing: true
|
||||||
@ -14,7 +14,7 @@ ha_release: 0.48
|
|||||||
|
|
||||||
The [Snips Voice Platform](https://www.snips.ai) allows users to add powerful voice assistants to their Raspberry Pi devices without compromising on privacy. It runs 100% on-device, and does not require an internet connection. It features Hotword Detection, Automatic Speech Recognition (ASR), Natural Language Understanding (NLU) and Dialog Management.
|
The [Snips Voice Platform](https://www.snips.ai) allows users to add powerful voice assistants to their Raspberry Pi devices without compromising on privacy. It runs 100% on-device, and does not require an internet connection. It features Hotword Detection, Automatic Speech Recognition (ASR), Natural Language Understanding (NLU) and Dialog Management.
|
||||||
|
|
||||||
The latest documentation can be found here: [Snips Platform Documentation](https://github.com/snipsco/snips-platform-documentation/wiki).
|
The latest documentation can be found here: [Snips Platform Documentation](https://snips.gitbook.io/documentation/).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -166,11 +166,11 @@ SetTimer:
|
|||||||
```
|
```
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
### Sending TTS Notifications
|
### {% linkable_title Sending TTS Notifications %}
|
||||||
|
|
||||||
You can send TTS notifications to Snips using the snips.say and snips.say_action services. Say_action starts a session and waits for user response, "Would you like me to close the garage door?", "Yes, close the garage door".
|
You can send TTS notifications to Snips using the snips.say and snips.say_action services. Say_action starts a session and waits for user response, "Would you like me to close the garage door?", "Yes, close the garage door".
|
||||||
|
|
||||||
#### {% linkable_title Service `snips/say` %}
|
#### {% linkable_title Service `snips.say` %}
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
|------------------------|----------|--------------------------------------------------------|
|
|------------------------|----------|--------------------------------------------------------|
|
||||||
@ -178,7 +178,7 @@ You can send TTS notifications to Snips using the snips.say and snips.say_action
|
|||||||
| `site_id` | yes | Site to use to start session. |
|
| `site_id` | yes | Site to use to start session. |
|
||||||
| `custom_data` | yes | custom data that will be included with all messages in this session. |
|
| `custom_data` | yes | custom data that will be included with all messages in this session. |
|
||||||
|
|
||||||
#### {% linkable_title Service `snips/say_action` %}
|
#### {% linkable_title Service `snips.say_action` %}
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
|------------------------|----------|--------------------------------------------------------|
|
|------------------------|----------|--------------------------------------------------------|
|
||||||
@ -188,19 +188,48 @@ You can send TTS notifications to Snips using the snips.say and snips.say_action
|
|||||||
| `can_be_enqueued` | yes | If True, session waits for an open session to end, if False session is dropped if one is running. |
|
| `can_be_enqueued` | yes | If True, session waits for an open session to end, if False session is dropped if one is running. |
|
||||||
| `intent_filter` | yes | Array of Strings - A list of intents names to restrict the NLU resolution to on the first query. |
|
| `intent_filter` | yes | Array of Strings - A list of intents names to restrict the NLU resolution to on the first query. |
|
||||||
|
|
||||||
#### Configuration Examples
|
|
||||||
|
### {% linkable_title Snips Support %}
|
||||||
|
|
||||||
|
There is an active [discord](https://discordapp.com/invite/3939Kqx) channel for further support.
|
||||||
|
|
||||||
|
### {% linkable_title Configuration Examples %}
|
||||||
|
|
||||||
|
#### {% linkable_title Turn on a light %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
script:
|
intent_script:
|
||||||
turn_on_light:
|
turn_on_light:
|
||||||
sequence:
|
speech:
|
||||||
service: script.turn_on_light
|
type: plain
|
||||||
service: snips.say
|
text: 'OK, closing the garage door'
|
||||||
data:
|
action:
|
||||||
text: 'OK, the light is now on'
|
service: light.turn_on
|
||||||
|
```
|
||||||
|
|
||||||
|
##### {% linkable_title Open a Garage Door %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
intent_script:
|
||||||
|
OpenGarageDoor:
|
||||||
|
speech:
|
||||||
|
type: plain
|
||||||
|
text: 'OK, opening the garage door'
|
||||||
|
action:
|
||||||
|
- service: cover.open_cover
|
||||||
|
data:
|
||||||
|
entity_id: garage_door
|
||||||
|
```
|
||||||
|
|
||||||
|
##### {% linkable_title Intiating a query %}
|
||||||
|
|
||||||
|
Here is a more complex example. The automation is triggered if the garage door is open for more than 10 minutes.
|
||||||
|
Snips will then ask you if you want to close it and if you respond with something like "Close the garage door" it
|
||||||
|
will do so. Unfortunately there is no builtin support for yes and no responses.
|
||||||
|
|
||||||
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
query_garage_door:
|
garage_door_has_been_open:
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.my_garage_door_sensor
|
entity_id: binary_sensor.my_garage_door_sensor
|
||||||
@ -224,3 +253,42 @@ intent_script:
|
|||||||
action:
|
action:
|
||||||
- service: script.garage_door_close
|
- service: script.garage_door_close
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### {% linkable_title Weather %}
|
||||||
|
|
||||||
|
So now you can open and close your garage door, let's check the weather. Add the Weather by Snips Skill to your assistant.
|
||||||
|
|
||||||
|
Create a weather sensor, in this example (Dark Sky)[/components/sensor.darksky/] and the api_key in the secrets file.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- platform: darksky
|
||||||
|
name: "Dark Sky Weather"
|
||||||
|
api_key: !secret dark_sky_key
|
||||||
|
update_interval:
|
||||||
|
minutes: 10
|
||||||
|
monitored_conditions:
|
||||||
|
- summary
|
||||||
|
- hourly_summary
|
||||||
|
- temperature
|
||||||
|
- temperature_max
|
||||||
|
- temperature_min
|
||||||
|
```
|
||||||
|
|
||||||
|
Then create this intent_script.yaml file in your config directory
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
```yaml
|
||||||
|
intent_script:
|
||||||
|
searchWeatherForecast:
|
||||||
|
speech:
|
||||||
|
type: plain
|
||||||
|
text: >
|
||||||
|
The weather is currently
|
||||||
|
{{ states('sensor.dark_sky_weather_temperature') | round(0) }}
|
||||||
|
degrees outside and {{ states('sensor.dark_sky_weather_summary') }}.
|
||||||
|
The high today will be
|
||||||
|
{{ states('sensor.dark_sky_weather_daily_high_temperature') | round(0)}}
|
||||||
|
and {{ states('sensor.dark_sky_weather_hourly_summary') }}
|
||||||
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user