From 616e8f6a65f88e60093c6c48bc27381d6adaa7f7 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 18 Feb 2021 13:56:15 +0100 Subject: [PATCH] Add selectors to Scene service definitions (#46729) --- homeassistant/components/scene/services.yaml | 52 +++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/scene/services.yaml b/homeassistant/components/scene/services.yaml index 29fa11e9367..dc9e9e07ab4 100644 --- a/homeassistant/components/scene/services.yaml +++ b/homeassistant/components/scene/services.yaml @@ -1,53 +1,79 @@ # Describes the format for available scene services turn_on: - description: Activate a scene. + description: Activate a scene + target: fields: transition: + name: Transition description: Transition duration in seconds it takes to bring devices to the state defined in the scene. example: 2.5 - entity_id: - description: Name(s) of scenes to turn on - example: "scene.romantic" + selector: + number: + min: 0 + max: 300 + step: 1 + unit_of_measurement: seconds + mode: slider reload: description: Reload the scene configuration apply: - description: - Activate a scene. Takes same data as the entities field from a single scene - in the config. + description: Activate a scene with configuration fields: - transition: - description: - Transition duration in seconds it takes to bring devices to the state - defined in the scene. - example: 2.5 entities: + name: Entities state description: The entities and the state that they need to be. + required: true example: light.kitchen: "on" light.ceiling: state: "on" brightness: 80 + selector: + object: + transition: + name: Transition + description: + Transition duration in seconds it takes to bring devices to the state + defined in the scene. + example: 2.5 + selector: + number: + min: 0 + max: 300 + step: 1 + unit_of_measurement: seconds + mode: slider create: - description: Creates a new scene. + description: Creates a new scene fields: scene_id: + name: Scene entity ID description: The entity_id of the new scene. + required: true example: all_lights + selector: + text: entities: + name: Entities state description: The entities to control with the scene. example: light.tv_back_light: "on" light.ceiling: state: "on" brightness: 200 + selector: + object: snapshot_entities: + name: Snapshot entities description: The entities of which a snapshot is to be taken example: - light.ceiling - light.kitchen + selector: + object: