I would like to pass two input_text to one automation, lovelace card looks as follows:
I would like to add some action button and when I type both texts and press buttton then would like to trigger automation and pass to it both input_text fields.
Could you advise?
If these are the only two input_texts that will ever be used by the script, then you don’t even need to pass their values as variables. The script can directly reference each input_text’s value.
Here’s an example of what I mean:
I have two input_texts:
input_text.text_1
input_text.text_2
I created the following script, called script.combine_texts, which simply combines the values of the two input texts and displays them as a persistent_notification.
I created an Entities card containing the two input_texts and the script. Here is how it appears after I entered some text in the input_texts:
When I click EXECUTE, the script is executed and it produces the following persistent_notification. The important point here is that it directly references the values of the two input_texts.
That was the simplest example and it can be more sophisticated. For example, you may wish to use a button to execute the script.