Add target and selectors to remote services (#49384)

This commit is contained in:
tkdrob 2021-04-23 05:25:53 -04:00 committed by GitHub
parent 28a909c463
commit 50d2c3bfe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,82 +1,129 @@
# Describes the format for available remote services # Describes the format for available remote services
turn_on: turn_on:
name: Turn On
description: Sends the Power On Command. description: Sends the Power On Command.
target:
fields: fields:
entity_id:
description: Name(s) of entities to turn on.
example: "remote.family_room"
activity: activity:
description: Activity ID or Activity Name to start. description: Activity ID or Activity Name to start.
example: "BedroomTV" example: "BedroomTV"
selector:
text:
toggle: toggle:
name: Toggle
description: Toggles a device. description: Toggles a device.
fields: target:
entity_id:
description: Name(s) of entities to toggle.
example: "remote.family_room"
turn_off: turn_off:
name: Turn Off
description: Sends the Power Off Command. description: Sends the Power Off Command.
fields: target:
entity_id:
description: Name(s) of entities to turn off.
example: "remote.family_room"
send_command: send_command:
name: Send Command
description: Sends a command or a list of commands to a device. description: Sends a command or a list of commands to a device.
target:
fields: fields:
entity_id:
description: Name(s) of entities to send command from.
example: "remote.family_room"
device: device:
name: Device
description: Device ID to send command to. description: Device ID to send command to.
example: "32756745" example: "32756745"
command: command:
name: Command
description: A single command or a list of commands to send. description: A single command or a list of commands to send.
required: true
example: "Play" example: "Play"
selector:
text:
num_repeats: num_repeats:
description: An optional value that specifies the number of times you want to repeat the command(s). If not specified, the command(s) will not be repeated. name: Repeats
description: An optional value that specifies the number of times you want to repeat the command(s).
example: "5" example: "5"
default: 1
selector:
number:
min: 0
max: 255
step: 1
mode: slider
delay_secs: delay_secs:
description: An optional value that specifies that number of seconds you want to wait in between repeated commands. If not specified, the default of 0.4 seconds will be used. name: Delay Seconds
description: Specify the number of seconds you want to wait in between repeated commands.
example: "0.75" example: "0.75"
default: 0.4
selector:
number:
min: 0
max: 60
step: 0.1
mode: slider
hold_secs: hold_secs:
description: An optional value that specifies that number of seconds you want to have it held before the release is send. If not specified, the release will be send immediately after the press. name: Hold Seconds
description: An optional value that specifies the number of seconds you want to have it held before the release is send.
example: "2.5" example: "2.5"
default: 0
selector:
number:
min: 0
max: 60
step: 0.1
mode: slider
learn_command: learn_command:
name: Learn Command
description: Learns a command or a list of commands from a device. description: Learns a command or a list of commands from a device.
target:
fields: fields:
entity_id:
description: Name(s) of entities to learn command from.
example: "remote.bedroom"
device: device:
description: Device ID to learn command from. description: Device ID to learn command from.
example: "television" example: "television"
command: command:
name: Command
description: A single command or a list of commands to learn. description: A single command or a list of commands to learn.
example: "Turn on" example: "Turn on"
selector:
object:
command_type: command_type:
name: Command Type
description: The type of command to be learned. description: The type of command to be learned.
example: "rf" example: "rf"
default: "ir"
selector:
select:
options:
- "ir"
- "rf"
alternative: alternative:
name: Alternative
description: If code must be stored as alternative (useful for discrete remotes). description: If code must be stored as alternative (useful for discrete remotes).
example: "True" example: "True"
selector:
boolean:
timeout: timeout:
name: Timeout
description: Timeout, in seconds, for the command to be learned. description: Timeout, in seconds, for the command to be learned.
example: "30" example: "30"
selector:
number:
min: 0
max: 60
step: 5
mode: slider
delete_command: delete_command:
name: Delete Command
description: Deletes a command or a list of commands from the database. description: Deletes a command or a list of commands from the database.
target:
fields: fields:
entity_id:
description: Name(s) of the remote entities holding the database.
example: "remote.bedroom"
device: device:
description: Name of the device from which commands will be deleted. description: Name of the device from which commands will be deleted.
example: "television" example: "television"
command: command:
name: Command
description: A single command or a list of commands to delete. description: A single command or a list of commands to delete.
required: true
example: "Mute" example: "Mute"
selector:
object: