New docs for monoprice config flow (#12480)

* New docs for monoprice config flow

* ✏️ Add config flow

* ✏️ Tweak

Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
On Freund 2020-03-22 15:40:53 +02:00 committed by GitHub
parent c7bba3c5b5
commit 7551e9985d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ description: Instructions on how to integrate Monoprice 6-Zone Home Audio Contro
ha_category:
- Media Player
ha_release: 0.56
ha_config_flow: true
ha_iot_class: Local Polling
ha_codeowners:
- '@etsinko'
@ -12,53 +13,21 @@ ha_domain: monoprice
The `monoprice` platform allows you to control [Monoprice 6-Zone Amplifier](https://www.monoprice.com/product?p_id=10761) using a serial connection.
To add a Monoprice device to your installation, add the following to your `configuration.yaml` file:
## Configuration
```yaml
# Example configuration.yaml entry
media_player:
- platform: monoprice
port: /dev/ttyUSB0
zones:
11:
name: Main Bedroom
12:
name: Living Room
13:
name: Kitchen
14:
name: Bathroom
15:
name: Dining Room
16:
name: Guest Bedroom
sources:
1:
name: Sonos
5:
name: Chromecast
```
Menu: **Configuration** -> **Integrations**.
{% configuration %}
port:
description: The serial port to which Monoprice amplifier is connected.
required: true
type: string
zones:
description: This is the list of zones available. Valid zones are 11, 12, 13, 14, 15 or 16. In case multiple Monoprice devices are stacked together the list of valid zones is extended by 21, 22, 23, 24, 25 or 26 for the second device and 31, 32, 33, 34, 35 or 36 for the third device. Each zone must have a name assigned to it.
required: true
type: integer
sources:
description: The list of sources available. Valid source numbers are 1, 2, 3, 4, 5 or 6. Each source number corresponds to the input number on the Monoprice amplifier. Similar to zones, each source must have a name assigned to it.
required: true
type: integer
{% endconfiguration %}
Click on the `+` sign to add an integration and click on **Monoprice**.
Select the serial port to which Monoprice amplifier is connected, and name the six sources (leave sources you're not using empty).
## Services
### Service `monoprice.snapshot`
Take a snapshot of one or more zones' states. This service, and the following one are useful if you want to play a doorbell or notification sound and resume playback afterward. If no `entity_id` is provided, all zones are snapshotted.
Take a snapshot of one or more zones' states. This service, and the following one are useful if you want to play a doorbell or notification sound and resume playback afterward. If `entity_id` is `all`, all zones are snapshotted.
The following attributes are stored in a snapshot:
- Power status (On/Off)
- Mute status (On/Off)
- Volume level
@ -70,7 +39,7 @@ The following attributes are stored in a snapshot:
### Service `monoprice.restore`
Restore a previously taken snapshot of one or more speakers. If no `entity_id` is provided, all zones are restored.
Restore a previously taken snapshot of one or more speakers. If `entity_id` is `all`, all zones are restored.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |