Add selectors to Input * service definitions (#46652)

This commit is contained in:
Franck Nijhof 2021-02-18 12:23:30 +01:00 committed by GitHub
parent 39785c5cef
commit da662c4890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 90 additions and 68 deletions

View File

@ -1,20 +1,14 @@
toggle: toggle:
description: Toggles an input boolean. description: Toggle an input boolean
fields: target:
entity_id:
description: Entity id of the input boolean to toggle.
example: input_boolean.notify_alerts
turn_off: turn_off:
description: Turns off an input boolean description: Turn off an input boolean
fields: target:
entity_id:
description: Entity id of the input boolean to turn off.
example: input_boolean.notify_alerts
turn_on: turn_on:
description: Turns on an input boolean. description: Turn on an input boolean
fields: target:
entity_id:
description: Entity id of the input boolean to turn on.
example: input_boolean.notify_alerts
reload: reload:
description: Reload the input_boolean configuration. description: Reload the input_boolean configuration

View File

@ -1,21 +1,36 @@
set_datetime: set_datetime:
description: This can be used to dynamically set the date and/or time. Use date/time, datetime or timestamp. description: This can be used to dynamically set the date and/or time
target:
fields: fields:
entity_id:
description: Entity id of the input datetime to set the new value.
example: input_datetime.test_date_time
date: date:
name: Date
description: The target date the entity should be set to. description: The target date the entity should be set to.
example: '"2019-04-20"' example: '"2019-04-20"'
selector:
text:
time: time:
name: Time
description: The target time the entity should be set to. description: The target time the entity should be set to.
example: '"05:04:20"' example: '"05:04:20"'
selector:
time:
datetime: datetime:
name: Date & Time
description: The target date & time the entity should be set to. description: The target date & time the entity should be set to.
example: '"2019-04-20 05:04:20"' example: '"2019-04-20 05:04:20"'
selector:
text:
timestamp: timestamp:
description: The target date & time the entity should be set to as expressed by a UNIX timestamp. name: Timestamp
description:
The target date & time the entity should be set to as expressed by a
UNIX timestamp.
example: 1598027400 example: 1598027400
selector:
number:
min: 0
max: 9223372036854775807
mode: box
reload: reload:
description: Reload the input_datetime configuration. description: Reload the input_datetime configuration

View File

@ -1,23 +1,25 @@
decrement: decrement:
description: Decrement the value of an input number entity by its stepping. description: Decrement the value of an input number entity by its stepping
fields: target:
entity_id:
description: Entity id of the input number that should be decremented.
example: input_number.threshold
increment: increment:
description: Increment the value of an input number entity by its stepping. description: Increment the value of an input number entity by its stepping
fields: target:
entity_id:
description: Entity id of the input number that should be incremented.
example: input_number.threshold
set_value: set_value:
description: Set the value of an input number entity. description: Set the value of an input number entity
target:
fields: fields:
entity_id:
description: Entity id of the input number to set the new value.
example: input_number.threshold
value: value:
name: Value
description: The target value the entity should be set to. description: The target value the entity should be set to.
required: true
example: 42 example: 42
selector:
number:
min: 0
max: 9223372036854775807
step: 0.001
mode: box
reload: reload:
description: Reload the input_number configuration. description: Reload the input_number configuration.

View File

@ -1,50 +1,58 @@
select_next: select_next:
description: Select the next options of an input select entity. description: Select the next options of an input select entity
target:
fields: fields:
entity_id:
description: Entity id of the input select to select the next value for.
example: input_select.my_select
cycle: cycle:
description: If the option should cycle from the last to the first (defaults to true). name: Cycle
description: If the option should cycle from the last to the first.
default: true
example: true example: true
selector:
boolean:
select_option: select_option:
description: Select an option of an input select entity. description: Select an option of an input select entity
target:
fields: fields:
entity_id:
description: Entity id of the input select to select the value.
example: input_select.my_select
option: option:
name: Option
description: Option to be selected. description: Option to be selected.
required: true
example: '"Item A"' example: '"Item A"'
selector:
text:
select_previous: select_previous:
description: Select the previous options of an input select entity. description: Select the previous options of an input select entity
target:
fields: fields:
entity_id:
description: Entity id of the input select to select the previous value for.
example: input_select.my_select
cycle: cycle:
description: If the option should cycle from the first to the last (defaults to true). name: Cycle
description: If the option should cycle from the first to the last.
default: true
example: true example: true
selector:
boolean:
select_first: select_first:
description: Select the first option of an input select entity. description: Select the first option of an input select entity
fields: target:
entity_id:
description: Entity id of the input select to select the first value for.
example: input_select.my_select
select_last: select_last:
description: Select the last option of an input select entity. description: Select the last option of an input select entity
fields: target:
entity_id:
description: Entity id of the input select to select the last value for.
example: input_select.my_select
set_options: set_options:
description: Set the options of an input select entity. description: Set the options of an input select entity
target:
fields: fields:
entity_id:
description: Entity id of the input select to set the new options for.
example: input_select.my_select
options: options:
name: Options
description: Options for the input select entity. description: Options for the input select entity.
required: true
example: '["Item A", "Item B", "Item C"]' example: '["Item A", "Item B", "Item C"]'
selector:
object:
reload: reload:
description: Reload the input_select configuration. description: Reload the input_select configuration.

View File

@ -1,11 +1,14 @@
set_value: set_value:
description: Set the value of an input text entity. description: Set the value of an input text entity
target:
fields: fields:
entity_id:
description: Entity id of the input text to set the new value.
example: input_text.text1
value: value:
name: Value
description: The target value the entity should be set to. description: The target value the entity should be set to.
required: true
example: This is an example text example: This is an example text
selector:
text:
reload: reload:
description: Reload the input_text configuration. description: Reload the input_text configuration.