Migrate vacuum services to support translations (#96417)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Franck Nijhof 2023-07-12 18:06:16 +02:00 committed by GitHub
parent 848221a1d7
commit 06adace7ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 30 deletions

View file

@ -1,8 +1,6 @@
# Describes the format for available vacuum services
turn_on:
name: Turn on
description: Start a new cleaning task.
target:
entity:
domain: vacuum
@ -10,8 +8,6 @@ turn_on:
- vacuum.VacuumEntityFeature.TURN_ON
turn_off:
name: Turn off
description: Stop the current cleaning task and return to home.
target:
entity:
domain: vacuum
@ -19,8 +15,6 @@ turn_off:
- vacuum.VacuumEntityFeature.TURN_OFF
stop:
name: Stop
description: Stop the current cleaning task.
target:
entity:
domain: vacuum
@ -28,8 +22,6 @@ stop:
- vacuum.VacuumEntityFeature.STOP
locate:
name: Locate
description: Locate the vacuum cleaner robot.
target:
entity:
domain: vacuum
@ -37,8 +29,6 @@ locate:
- vacuum.VacuumEntityFeature.LOCATE
start_pause:
name: Start/Pause
description: Start, pause, or resume the cleaning task.
target:
entity:
domain: vacuum
@ -46,8 +36,6 @@ start_pause:
- vacuum.VacuumEntityFeature.PAUSE
start:
name: Start
description: Start or resume the cleaning task.
target:
entity:
domain: vacuum
@ -55,8 +43,6 @@ start:
- vacuum.VacuumEntityFeature.START
pause:
name: Pause
description: Pause the cleaning task.
target:
entity:
domain: vacuum
@ -64,8 +50,6 @@ pause:
- vacuum.VacuumEntityFeature.PAUSE
return_to_base:
name: Return to base
description: Tell the vacuum cleaner to return to its dock.
target:
entity:
domain: vacuum
@ -73,45 +57,31 @@ return_to_base:
- vacuum.VacuumEntityFeature.RETURN_HOME
clean_spot:
name: Clean spot
description: Tell the vacuum cleaner to do a spot clean-up.
target:
entity:
domain: vacuum
send_command:
name: Send command
description: Send a raw command to the vacuum cleaner.
target:
entity:
domain: vacuum
fields:
command:
name: Command
description: Command to execute.
required: true
example: "set_dnd_timer"
selector:
text:
params:
name: Parameters
description: Parameters for the command.
example: '{ "key": "value" }'
selector:
object:
set_fan_speed:
name: Set fan speed
description: Set the fan speed of the vacuum cleaner.
target:
entity:
domain: vacuum
fields:
fan_speed:
name: Fan speed
description:
Platform dependent vacuum cleaner fan speed, with speed steps, like
'medium' or by percentage, between 0 and 100.
required: true
example: "low"
selector:

View file

@ -34,5 +34,67 @@
"title": "The {platform} custom integration is using deprecated vacuum feature",
"description": "The custom integration `{platform}` is extending the deprecated base class `VacuumEntity` instead of `StateVacuumEntity`.\n\nPlease report it to the author of the `{platform}` custom integration.\n\nOnce an updated version of `{platform}` is available, install it and restart Home Assistant to fix this issue."
}
},
"services": {
"turn_on": {
"name": "Turn on",
"description": "Starts a new cleaning task."
},
"turn_off": {
"name": "Turn off",
"description": "Stops the current cleaning task and returns to its dock."
},
"stop": {
"name": "Stop",
"description": "Stops the current cleaning task."
},
"locate": {
"name": "Locate",
"description": "Locates the vacuum cleaner robot."
},
"start_pause": {
"name": "Start/pause",
"description": "Starts, pauses, or resumes the cleaning task."
},
"start": {
"name": "Start",
"description": "Starts or resumes the cleaning task."
},
"pause": {
"name": "Pause",
"description": "Pauses the cleaning task."
},
"return_to_base": {
"name": "Return to base",
"description": "Tells the vacuum cleaner to return to its dock."
},
"clean_spot": {
"name": "Clean spot",
"description": "Tells the vacuum cleaner to do a spot clean-up."
},
"send_command": {
"name": "Send command",
"description": "Sends a raw command to the vacuum cleaner.",
"fields": {
"command": {
"name": "Command",
"description": "Command to execute. The commands are integration-specific."
},
"params": {
"name": "Parameters",
"description": "Parameters for the command. The parameters are integration-specific."
}
}
},
"set_fan_speed": {
"name": "Set fan speed",
"description": "Sets the fan speed of the vacuum cleaner.",
"fields": {
"fan_speed": {
"name": "Fan speed",
"description": "Fan speed. The value depends on the integration. Some integrations have speed steps, like 'medium'. Some use a percentage, between 0 and 100."
}
}
}
}
}