Add yeelight music mode service (#16021)

* Add yeelight music mode service

* Rename

* Entity id is optional

* Entity id is optional
This commit is contained in:
zewelor 2020-12-30 17:04:30 +01:00 committed by GitHub
parent a464bce3d5
commit 5da0fb3a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,7 @@ Set an operation mode.
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `mode` | no | Operation mode. Valid values are 'last', 'normal', 'rgb', 'hsv', 'color_flow', 'moonlight'. |
### Service `yeelight.start_flow`
@ -201,7 +201,7 @@ Start flow with specified transitions
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `count` | yes | The number of times to run this flow (0 to run forever). |
| `action` | yes | The action to take after the flow stops. Can be 'recover', 'stay', 'off'. Default 'recover' |
| `transitions` | no | Array of transitions. See [custom effects](#custom-effects). |
@ -212,7 +212,7 @@ Changes the light to the specified RGB color and brightness. If the light is off
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `rgb_color` | no | A list containing three integers between 0 and 255 representing the RGB color you want the light to be. Three comma-separated integers that represent the color in RGB, within square brackets.|
| `brightness` | no | The brightness value to set (1-100). |
@ -222,7 +222,7 @@ Changes the light to the specified HSV color and brightness. If the light is off
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `hs_color` | no | A list containing two floats representing the hue and saturation of the color you want the light to be. Hue is scaled 0-360, and saturation is scaled 0-100. |
| `brightness` | no | The brightness value to set (1-100). |
@ -232,7 +232,7 @@ Changes the light to the specified color temperature. If the light is off, it wi
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `kelvin` | no | Color temperature in Kelvin. |
| `brightness` | no | The brightness value to set (1-100). |
@ -242,7 +242,7 @@ Starts a color flow. Difference between this and [yeelight.start_flow](#service-
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `count` | yes | The number of times to run this flow (0 to run forever). |
| `action` | yes | The action to take after the flow stops. Can be 'recover', 'stay', 'off'. Default 'recover' |
| `transitions` | no | Array of transitions. See [custom effects](#custom-effects). |
@ -253,6 +253,15 @@ Turns the light on to the specified brightness and sets a timer to turn it back
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | no | Only act on specific lights. |
| `entity_id` | yes | Only act on specific lights. |
| `minutes` | no | The minutes to wait before automatically turning the light off. |
| `brightness` | no | The brightness value to set (1-100). |
### Service `yeelight.set_music_mode`
Enable or disable music_mode.
| Service data attribute | Optional | Description |
|---------------------------|----------|---------------------------------------------------------------------------------------------|
| `entity_id` | yes | Only act on specific lights. |
| `music_mode` | no | Use 'true' or 'false' to enable / disable music_mode. |