mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 21:06:50 +00:00
Sonos updates (#8724)
This commit is contained in:
parent
2631c9b97e
commit
0deefbb31e
@ -23,82 +23,151 @@ If you don't have the discovery component enabled, you can configure the Sonos c
|
||||
|
||||
Sonos makes various services available to allow configuring groups. They are currently registered under the media player component.
|
||||
|
||||
### {% linkable_title Service `sonos_snapshot` %}
|
||||
### {% linkable_title Service `media_player.sonos_snapshot` %}
|
||||
|
||||
Take a snapshot of what is currently playing on one or more speakers. This service, and the following one, are useful if you want to play a doorbell or notification sound and resume playback afterwards. If no `entity_id` is provided, all speakers are snapshotted.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | yes | String or list of strings that point at `entity_id`s of coordinator speakers.
|
||||
| `with_group` | yes | Should be also snapshot the group state of the speaker.
|
||||
<p class='note'>
|
||||
The queue is not snapshotted and must be left untouched until the restore. Using `media_player.play_media` is safe and can be used to play a notification sound, including [TTS](/components/tts/) announcements.
|
||||
</p>
|
||||
|
||||
### {% linkable_title Service `sonos_restore` %}
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers to snapshot.
|
||||
required: false
|
||||
type: entity_id
|
||||
with_group:
|
||||
description: Should we also snapshot the group layout and the state of other speakers in the group.
|
||||
required: false
|
||||
type: boolean
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Service `media_player.sonos_restore` %}
|
||||
|
||||
Restore a previously taken snapshot of one or more speakers. If no `entity_id` is provided, all speakers are restored.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | yes | String or list of strings that point at `entity_id`s of coordinator speakers.
|
||||
| `with_group` | yes | Should be also restore the group state of the speaker. Only if was snapshot with group.
|
||||
<p class='note'>
|
||||
The playing queue is not snapshotted. Using `media_player.sonos_restore` on a speaker that has replaced its queue will restore the playing position, but in the new queue!
|
||||
</p>
|
||||
|
||||
### {% linkable_title Service `sonos_join` %}
|
||||
<p class='note'>
|
||||
A cloud queue cannot be restarted. This includes queues started from within Spotify and queues controlled by Amazon Alexa.
|
||||
</p>
|
||||
|
||||
Do group players together under a single coordinator. That will make a new group or join to exists group.
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers that should have their snapshot restored.
|
||||
required: false
|
||||
type: entity_id
|
||||
with_group:
|
||||
description: Should we also restore the group layout and the state of other speakers in the group.
|
||||
required: false
|
||||
type: boolean
|
||||
{% endconfiguration %}
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `master` | no | A single `entity_id` that will become/hold the coordinator speaker.
|
||||
| `entity_id` | no | String or list of a single `entity_id` that will group to master speaker.
|
||||
### {% linkable_title Service `media_player.sonos_join` %}
|
||||
|
||||
### {% linkable_title Service `sonos_unjoin` %}
|
||||
Group players together under a single coordinator. This will make a new group or join to an existing group.
|
||||
|
||||
Remove one or more speakers from a group of speakers. If no `entity_id` is provided, all speakers are unjoined.
|
||||
{% configuration %}
|
||||
master:
|
||||
description: A single `entity_id` that will become/stay the coordinator speaker.
|
||||
required: true
|
||||
type: entity_id
|
||||
entity_id:
|
||||
description: The speakers to join to the master.
|
||||
required: false
|
||||
type: entity_id
|
||||
{% endconfiguration %}
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of `entity_id`s that will be separated from their coordinator speaker.
|
||||
### {% linkable_title Service `media_player.sonos_unjoin` %}
|
||||
|
||||
### {% linkable_title Service `sonos_set_sleep_timer` %}
|
||||
Remove one or more speakers from their group of speakers. If no `entity_id` is provided, all speakers are unjoined.
|
||||
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers to separate from their coordinator speaker.
|
||||
required: false
|
||||
type: entity_id
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Service `media_player.sonos_set_sleep_timer` %}
|
||||
|
||||
Sets a timer that will turn off a speaker by tapering the volume down to 0 after a certain amount of time. Protip: If you set the sleep_time value to 0, then the speaker will immediately start tapering the volume down.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of `entity_id`s that will have their timers set. Must be a coordinator speaker.
|
||||
| `sleep_time` | no | Integer number of seconds that the speaker should wait until it starts tapering. Cannot exceed 86399 (one day).
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers that will have their timers set.
|
||||
required: true
|
||||
type: entity_id
|
||||
sleep_time:
|
||||
description: Number of seconds that the speaker should wait until it starts tapering. Cannot exceed 86399 (one day).
|
||||
required: true
|
||||
type: integer
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Service `sonos_clear_sleep_timer` %}
|
||||
### {% linkable_title Service `media_player.sonos_clear_sleep_timer` %}
|
||||
|
||||
Clear the sleep timer on a speaker, if one is set.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of `entity_id`s that will have their timers cleared. Must be a coordinator speaker.
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers that will have their timers cleared.
|
||||
required: true
|
||||
type: entity_id
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Service `sonos_update_alarm` %}
|
||||
### {% linkable_title Service `media_player.sonos_update_alarm` %}
|
||||
|
||||
Update an existing Sonos alarm.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of `entity_id`s that will have their timers cleared. Must be a coordinator speaker.
|
||||
| `alarm_id` | no | Integer that is used in Sonos to refer to your alarm.
|
||||
| `time` | yes | Time to set the alarm.
|
||||
| `volume` | yes | Float for volume level.
|
||||
| `enabled` | yes | Boolean for whether or not to enable this alarm.
|
||||
| `include_linked_zones` | yes | Boolean that defines if the alarm also plays on grouped players.
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speaker that will have its alarm updated.
|
||||
required: true
|
||||
type: entity_id
|
||||
alarm_id:
|
||||
description: Integer that is used in Sonos to refer to your alarm.
|
||||
required: true
|
||||
type: integer
|
||||
time:
|
||||
description: Time to set the alarm.
|
||||
required: no
|
||||
type: time
|
||||
volume:
|
||||
description: Float for volume level (0.0-1.0).
|
||||
required: no
|
||||
type: float
|
||||
enabled:
|
||||
description: Boolean for whether or not to enable this alarm.
|
||||
required: no
|
||||
type: boolean
|
||||
include_linked_zones:
|
||||
description: Boolean that defines if the alarm also plays on grouped players.
|
||||
required: no
|
||||
type: boolean
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Service `sonos_set_option` %}
|
||||
### {% linkable_title Service `media_player.sonos_set_option` %}
|
||||
|
||||
Set Sonos speaker options.
|
||||
|
||||
Night Sound and Speech Enhancement modes are only supported on Sonos PLAYBAR and PLAYBASE speakers when playing from the TV source. Other speaker types will ignore these options.
|
||||
Night Sound and Speech Enhancement modes are only supported when playing from the TV source of products like Sonos Playbar and Sonos Beam. Other speaker types will ignore these options.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `entity_id` | no | String or list of `entity_id`s that will have their options set.
|
||||
| `night_sound` | yes | Boolean to control Night Sound mode.
|
||||
| `speech_enhance` | yes | Boolean to control Speech Enhancement mode.
|
||||
{% configuration %}
|
||||
entity_id:
|
||||
description: The speakers that will have their options set.
|
||||
required: true
|
||||
type: entity_id
|
||||
night_sound:
|
||||
description: Boolean to control Night Sound mode.
|
||||
required: no
|
||||
type: boolean
|
||||
speech_enhance:
|
||||
description: Boolean to control Speech Enhancement mode.
|
||||
required: no
|
||||
type: boolean
|
||||
{% endconfiguration %}
|
||||
|
||||
## {% linkable_title Advanced use %}
|
||||
|
||||
@ -133,9 +202,3 @@ sonos:
|
||||
- 192.0.2.26
|
||||
- 192.0.2.27
|
||||
```
|
||||
|
||||
## {% linkable_title Additional information %}
|
||||
|
||||
This component is using the [SoCo](https://github.com/SoCo/SoCo) project.
|
||||
|
||||
To be able to support the Sonos components and features it is mandatory to have TCP port 1400 opened. This port is used to receive events about changes on the Sonos network. For more details please see the [SoCo documentation](https://github.com/SoCo/SoCo) and source code of the SoCo project.
|
||||
|
Loading…
x
Reference in New Issue
Block a user