1
mirror of https://github.com/home-assistant/core synced 2024-07-30 21:18:57 +02:00

Add advanced service parameter flag (#46727)

This commit is contained in:
Franck Nijhof 2021-02-18 12:59:46 +01:00 committed by GitHub
parent 82934b31f8
commit 62cfe24ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 7 deletions

View File

@ -22,7 +22,8 @@ turn_on:
description: A human readable color name.
example: "red"
hs_color:
description: Color for the light in hue/sat format. Hue is 0-360 and Sat is 0-100.
description:
Color for the light in hue/sat format. Hue is 0-360 and Sat is 0-100.
example: "[300, 70]"
xy_color:
description: Color for the light in XY-format.
@ -37,11 +38,25 @@ turn_on:
description: Number between 0..255 indicating level of white.
example: "250"
brightness:
description: Number between 0..255 indicating brightness, where 0 turns the light off, 1 is the minimum brightness and 255 is the maximum brightness supported by the light.
name: Brightness value
description:
Number between 0..255 indicating brightness, where 0 turns the light
off, 1 is the minimum brightness and 255 is the maximum brightness
supported by the light.
advanced: true
example: 120
selector:
number:
min: 0
max: 255
step: 1
mode: slider
brightness_pct:
name: Brightness
description: Number between 0..100 indicating percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness and 100 is the maximum brightness supported by the light.
description:
Number between 0..100 indicating percentage of full brightness, where 0
turns the light off, 1 is the minimum brightness and 100 is the maximum
brightness supported by the light.
example: 47
selector:
number:
@ -54,7 +69,8 @@ turn_on:
description: Change brightness by an amount. Should be between -255..255.
example: -25.5
brightness_step_pct:
description: Change brightness by a percentage. Should be between -100..100.
description:
Change brightness by a percentage. Should be between -100..100.
example: -10
profile:
description: Name of a light profile to use.
@ -104,7 +120,8 @@ toggle:
description: A human readable color name.
example: "red"
hs_color:
description: Color for the light in hue/sat format. Hue is 0-360 and Sat is 0-100.
description:
Color for the light in hue/sat format. Hue is 0-360 and Sat is 0-100.
example: "[300, 70]"
xy_color:
description: Color for the light in XY-format.
@ -119,10 +136,16 @@ toggle:
description: Number between 0..255 indicating level of white.
example: "250"
brightness:
description: Number between 0..255 indicating brightness, where 0 turns the light off, 1 is the minimum brightness and 255 is the maximum brightness supported by the light.
description:
Number between 0..255 indicating brightness, where 0 turns the light
off, 1 is the minimum brightness and 255 is the maximum brightness
supported by the light.
example: 120
brightness_pct:
description: Number between 0..100 indicating percentage of full brightness, where 0 turns the light off, 1 is the minimum brightness and 100 is the maximum brightness supported by the light.
description:
Number between 0..100 indicating percentage of full brightness, where 0
turns the light off, 1 is the minimum brightness and 100 is the maximum
brightness supported by the light.
example: 47
profile:
description: Name of a light profile to use.

View File

@ -29,6 +29,7 @@ FIELD_SCHEMA = vol.Schema(
vol.Optional("default"): exists,
vol.Optional("values"): exists,
vol.Optional("required"): bool,
vol.Optional("advanced"): bool,
vol.Optional(CONF_SELECTOR): selector.validate_selector,
}
)