Input text
The input text helper in Home Assistant holds a piece of text that can be changed from a dashboard or from automations, optionally kept to a length or a pattern, or hidden like a password.
Spook adds actions to the input text integration to create and delete these helpers from automations and scripts.
Actions
Spook adds two actions for input texts. You find them wherever you add an action, marked with a 👻.
Create an input text
Creates a new input text helper, the same as adding one on the helpers page.
Some text only matters for a while. The last message a script sent, the name of the guest staying this weekend, a note for whoever comes home first. Made by hand, that helper stays on the helpers page long after. Made with this action, the script makes it when it needs it, and deletes it when it is done.
How to use it
- Open the automation or script that should make the helper, and select Add action.
- Search for create an input text, and select Input text: Create an input text 👻.
- Fill in Name, like
Last message. - Optionally, set Input text entity ID to pick the entity ID yourself, and any of Initial value, Minimum length, Maximum length, Pattern, Mode, Icon and Unit of measurement.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

| Action properties | |
|---|---|
| Action | Input text: Create an input text 👻 |
| Action name | input_text.create |
| Action targets | No targets |
| Action response | Optional, the entity_id of the new input text |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
name | string | Yes | Last message |
input_text_id | string | No | last_message |
initial | string | No | Hello |
min | integer | No | 0 |
max | integer | No | 100 |
pattern | string | No | [a-z ]* |
mode | string | No | text |
icon | string | No | mdi:message-text |
unit_of_measurement | string | No | words |
The minimum length cannot be above the maximum, and an initial value has to fit between them. A call that does not is refused.
Without an input_text_id, the entity ID follows the name, as it does in the UI, and gets a number at the end if that name is already taken. With an input_text_id, you get exactly that entity ID or an error: one that is already taken is refused, and does not get a number at the end.
Make a text helper for the last message, up to 255 characters, and keep its entity ID for the steps after it:
action: input_text.create
data:
name: "Last message"
input_text_id: last_message
max: 255
response_variable: created
The new input text's entity ID is then in {{ created.entity_id }}.
Delete an input text
Deletes one or more input text helpers.
The other half of Create an input text: the script that made a helper cleans it up again. It works on any input text made in the UI as well, disabled ones included.
How to use it
- Open the automation or script that should do the cleaning up, and select Add action.
- Search for delete an input text, and select Input text: Delete an input text 👻.
- Under Entity ID, choose the input texts to delete.
- Select Save.
Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind that it really deletes.

| Action properties | |
|---|---|
| Action | Input text: Delete an input text 👻 |
| Action name | input_text.delete |
| Action targets | No targets |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | Try this action |
| Action data parameters | |||
|---|---|---|---|
| Attribute | Type | Required | Default / Example |
entity_id | string | list of strings | Yes | input_text.last_message |
Remove the last message helper again:
action: input_text.delete
data:
entity_id: input_text.last_message
- Input texts set up in YAML can only be removed from the YAML. Asking for one is an error.
- Everything in the list is checked first: if one of them cannot be deleted, none of them are.
Use cases
What people use this for:
- Let a script make the text helper it needs, and clean it up again afterwards, so the helpers page only has input texts you actually use.
Missing something here?
An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.
Input select
Spook adds actions to create and delete input select helpers, pick a random option, and shuffle, sort or reverse the list of options.
Light
Spook adds actions that adjust the lights that are already on, leave the ones that are off alone, and step every light in a group from its own level instead of from the group average. Two more turn lights on or off for a while.


