The input select Helper in Home Assistant allows the user to define a list of options that can be controlled via the frontend and can be used within conditions of an automation. The frontend can display a dropdown or a list of buttons. Changes to the dropdown or list of buttons generate state events. These state events can be utilized as automation triggers as well.
Spook adds some new actions to the input select integration, which allows one to select a random option and to shuffle or sort the list of options in the input select.
Devices & entities¶
Spook does not provide any new devices or entities for this integration.
Actions¶
Spook adds the following new actions to your Home Assistant instance:
Select random option¶
Select a random option from the list of options in the input select.
Action properties | |
---|---|
Action | Input select: Select random option 👻 |
Action name | input_select.random |
Action targets | Yes, input_select entities |
Action response | No response |
Spook's influence | Newly added action |
Developer tools | Try this action |
Action data parameters | |||
---|---|---|---|
Attribute | Type | Required | Default / Example |
options | list of strings | No | Defaults to all available options |
The options
attribute is a list of strings, containing the options to select a random one from. If not provided, all available options configured in the input select are used.
Example actions in YAML
1 2 3
action: input_select.random target: entity_id: input_select.who_is_cooking_tonight
1 2 3 4 5 6 7 8
action: input_select.random target: entity_id: input_select.color data: options: - red - green - blue
Shuffle options¶
Shuffles the list of available options in the input select and keeps the current select options selected.
Action properties | |
---|---|
Action | Input select: Shuffle options 👻 |
Action name | input_select.shuffle |
Action targets | Yes, input_select entities |
Action response | No response |
Spook's influence | Newly added action |
Developer tools | Try this action |
1 2 3
action: input_select.shuffle target: entity_id: input_select.who_is_cooking_tonight
Sort options¶
Sorts the list of available options in the input select and keeps the current select options selected.
Action properties | |
---|---|
Action | Input select: Sort options 👻 |
Action name | input_select.sort |
Action targets | Yes, input_select entities |
Action response | No response |
Spook's influence | Newly added action |
Developer tools | Try this action |
1 2 3
action: input_select.sort target: entity_id: input_select.who_is_cooking_tonight
Repairs¶
Spook has no repair detections for this integration.
Uses cases¶
Some use cases for the enhancements Spook provides for this integration:
- The shuffle and random abilities can have very fun use cases in automations. For example, select a random person to cook dinner or do chores, or shuffle a sequence of scenes to play.
- The input select entity doesn’t allow you to re-order the options. The sort ability allows you to sort the options alphabetically, at least.
Blueprints & tutorials¶
There are currently no known blueprints or tutorials for the enhancements Spook provides for this integration. If you created one or stumbled upon one, please let us know in our discussion forums.
Features requests, ideas, and support¶
If you have an idea on how to further enhance this integration, for example, by adding a new action, entity, or repairs detection; feel free to let us know in our discussion forums.
Are you stuck using these new features? Or maybe you’ve run into a bug? Please check the Support page on where to go for help.