mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Migrate scene services to support translations (#96390)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
22b23b2c34
commit
9ef62c7599
@ -1,16 +1,11 @@
|
|||||||
# Describes the format for available scene services
|
# Describes the format for available scene services
|
||||||
|
|
||||||
turn_on:
|
turn_on:
|
||||||
name: Activate
|
|
||||||
description: Activate a scene.
|
|
||||||
target:
|
target:
|
||||||
entity:
|
entity:
|
||||||
domain: scene
|
domain: scene
|
||||||
fields:
|
fields:
|
||||||
transition:
|
transition:
|
||||||
name: Transition
|
|
||||||
description: Transition duration it takes to bring devices to the state
|
|
||||||
defined in the scene.
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 0
|
min: 0
|
||||||
@ -18,16 +13,9 @@ turn_on:
|
|||||||
unit_of_measurement: seconds
|
unit_of_measurement: seconds
|
||||||
|
|
||||||
reload:
|
reload:
|
||||||
name: Reload
|
|
||||||
description: Reload the scene configuration.
|
|
||||||
|
|
||||||
apply:
|
apply:
|
||||||
name: Apply
|
|
||||||
description: Activate a scene with configuration.
|
|
||||||
fields:
|
fields:
|
||||||
entities:
|
entities:
|
||||||
name: Entities state
|
|
||||||
description: The entities and the state that they need to be.
|
|
||||||
required: true
|
required: true
|
||||||
example: |
|
example: |
|
||||||
light.kitchen: "on"
|
light.kitchen: "on"
|
||||||
@ -37,9 +25,6 @@ apply:
|
|||||||
selector:
|
selector:
|
||||||
object:
|
object:
|
||||||
transition:
|
transition:
|
||||||
name: Transition
|
|
||||||
description: Transition duration it takes to bring devices to the state
|
|
||||||
defined in the scene.
|
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 0
|
min: 0
|
||||||
@ -47,19 +32,13 @@ apply:
|
|||||||
unit_of_measurement: seconds
|
unit_of_measurement: seconds
|
||||||
|
|
||||||
create:
|
create:
|
||||||
name: Create
|
|
||||||
description: Creates a new scene.
|
|
||||||
fields:
|
fields:
|
||||||
scene_id:
|
scene_id:
|
||||||
name: Scene entity ID
|
|
||||||
description: The entity_id of the new scene.
|
|
||||||
required: true
|
required: true
|
||||||
example: all_lights
|
example: all_lights
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
entities:
|
entities:
|
||||||
name: Entities state
|
|
||||||
description: The entities to control with the scene.
|
|
||||||
example: |
|
example: |
|
||||||
light.tv_back_light: "on"
|
light.tv_back_light: "on"
|
||||||
light.ceiling:
|
light.ceiling:
|
||||||
@ -68,8 +47,6 @@ create:
|
|||||||
selector:
|
selector:
|
||||||
object:
|
object:
|
||||||
snapshot_entities:
|
snapshot_entities:
|
||||||
name: Snapshot entities
|
|
||||||
description: The entities of which a snapshot is to be taken
|
|
||||||
example: |
|
example: |
|
||||||
- light.ceiling
|
- light.ceiling
|
||||||
- light.kitchen
|
- light.kitchen
|
||||||
|
@ -1 +1,51 @@
|
|||||||
{ "title": "Scene" }
|
{
|
||||||
|
"title": "Scene",
|
||||||
|
"services": {
|
||||||
|
"turn_on": {
|
||||||
|
"name": "Activate",
|
||||||
|
"description": "Activates a scene.",
|
||||||
|
"fields": {
|
||||||
|
"transition": {
|
||||||
|
"name": "Transition",
|
||||||
|
"description": "Time it takes the devices to transition into the states defined in the scene."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"reload": {
|
||||||
|
"name": "Reload",
|
||||||
|
"description": "Reloads the scenes from the YAML-configuration."
|
||||||
|
},
|
||||||
|
"apply": {
|
||||||
|
"name": "Apply",
|
||||||
|
"description": "Activates a scene with configuration.",
|
||||||
|
"fields": {
|
||||||
|
"entities": {
|
||||||
|
"name": "Entities state",
|
||||||
|
"description": "List of entities and their target state."
|
||||||
|
},
|
||||||
|
"transition": {
|
||||||
|
"name": "Transition",
|
||||||
|
"description": "Time it takes the devices to transition into the states defined in the scene."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"create": {
|
||||||
|
"name": "Create",
|
||||||
|
"description": "Creates a new scene.",
|
||||||
|
"fields": {
|
||||||
|
"scene_id": {
|
||||||
|
"name": "Scene entity ID",
|
||||||
|
"description": "The entity ID of the new scene."
|
||||||
|
},
|
||||||
|
"entities": {
|
||||||
|
"name": "Entities state",
|
||||||
|
"description": "List of entities and their target state. If your entities are already in the target state right now, use `snapshot_entities` instead."
|
||||||
|
},
|
||||||
|
"snapshot_entities": {
|
||||||
|
"name": "Snapshot entities",
|
||||||
|
"description": "List of entities to be included in the snapshot. By taking a snapshot, you record the current state of those entities. If you do not want to use the current state of all your entities for this scene, you can combine the `snapshot_entities` with `entities`."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user