Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/_components/media_player.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Interacts with media players on your network. Please check the sidebar for a ful
## {% linkable_title Services %}

### {% linkable_title Media control services %}
Available services: `turn_on`, `turn_off`, `toggle`, `volume_up`, `volume_down`, `media_play_pause`, `media_play`, `media_pause`, `media_stop`, `media_next_track`, `media_previous_track`, `clear_playlist`
Available services: `turn_on`, `turn_off`, `toggle`, `volume_up`, `volume_down`, `volume_set`, `media_play_pause`, `media_play`, `media_pause`, `media_stop`, `media_next_track`, `media_previous_track`, `clear_playlist`, `shuffle_set`

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ------------------------------------------------ |
Expand Down Expand Up @@ -63,6 +63,6 @@ Currently only supported on [Spotify](/components/media_player.spotify/), [MPD](
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ---------------------------------------------------- |
| `entity_id` | no | Target a specific media player. For example `media_player.spotify`|
| `shuffle` | no | `true`/`false` for enabling/disabling shuffle |
| `shuffle` | no | `true`/`false` for enabling/disabling shuffle |


58 changes: 58 additions & 0 deletions source/_components/snips.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,61 @@ SetTimer:
```
{% endraw %}

### 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".

#### {% linkable_title Service `snips/say` %}

| Service data attribute | Optional | Description |
|------------------------|----------|--------------------------------------------------------|
| `text` | no | Text to say. |
| `site_id` | yes | Site to use to start session. |
| `custom_data` | yes | custom data that will be included with all messages in this session. |

#### {% linkable_title Service `snips/say_action` %}

| Service data attribute | Optional | Description |
|------------------------|----------|--------------------------------------------------------|
| `text` | no | Text to say. |
| `site_id` | yes | Site to use to start session. |
| `custom_data` | yes | custom data that will be included with all messages in this session. |
| `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. |

#### Configuration Examples

```yaml
script:
turn_on_light:
sequence:
service: script.turn_on_light
service: snips.say
data:
text: 'OK, the light is now on'

automation:
query_garage_door:
trigger:
- platform: state
entity_id: binary_sensor.my_garage_door_sensor
from: 'off'
to: 'on'
for:
minutes: 10
sequence:
service: snips.say_action
data:
text: 'Garage door has been open 10 minutes, would you like me to close it?'
intentFilter:
- closeGarageDoor

# This intent is fired if the user responds with the appropriate intent after the above notification
intent_script:
closeGarageDoor:
speech:
type: plain
text: 'OK, closing the garage door'
action:
- service: script.garage_door_close
```