Files
core/homeassistant/components/input_select/services.yaml
Lars Marowsky-Brée 34194da1b6 New methods for input_select component (#42968)
This adds a `cycle` attribute to select_previous/next, and
select_first and select_last services.

This is quite useful for streamlining using input_select via
automations, such as when they represent a list of states to step
through; if the first option is the dimmest and the last the brightest,
one may not want to accidentally cycle from the first to the last, for
example.

Similarly, being able to directly select the first or last removes
adjustment in related automations.
2021-01-27 11:17:59 +01:00

51 lines
1.8 KiB
YAML

select_next:
description: Select the next options of an input select entity.
fields:
entity_id:
description: Entity id of the input select to select the next value for.
example: input_select.my_select
cycle:
description: If the option should cycle from the last to the first (defaults to true).
example: true
select_option:
description: Select an option of an input select entity.
fields:
entity_id:
description: Entity id of the input select to select the value.
example: input_select.my_select
option:
description: Option to be selected.
example: '"Item A"'
select_previous:
description: Select the previous options of an input select entity.
fields:
entity_id:
description: Entity id of the input select to select the previous value for.
example: input_select.my_select
cycle:
description: If the option should cycle from the first to the last (defaults to true).
example: true
select_first:
description: Select the first option of an input select entity.
fields:
entity_id:
description: Entity id of the input select to select the first value for.
example: input_select.my_select
select_last:
description: Select the last option of an input select entity.
fields:
entity_id:
description: Entity id of the input select to select the last value for.
example: input_select.my_select
set_options:
description: Set the options of an input select entity.
fields:
entity_id:
description: Entity id of the input select to set the new options for.
example: input_select.my_select
options:
description: Options for the input select entity.
example: '["Item A", "Item B", "Item C"]'
reload:
description: Reload the input_select configuration.