From 519d66add33206fba5f2fca4862475b9de601426 Mon Sep 17 00:00:00 2001 From: BioSehnsucht Date: Mon, 4 Sep 2017 05:32:18 -0500 Subject: [PATCH 1/2] Add input_text component --- source/_components/input_text.markdown | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 source/_components/input_text.markdown diff --git a/source/_components/input_text.markdown b/source/_components/input_text.markdown new file mode 100644 index 000000000000..96548fe5a1eb --- /dev/null +++ b/source/_components/input_text.markdown @@ -0,0 +1,44 @@ +--- +layout: page +title: "Input Text" +description: "Instructions how to integrate the Input Text component into Home Assistant." +date: 2016-03-15 06:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: home-assistant.png +ha_category: Automation +ha_release: 0.54 +--- + +The `input_text` component allows the user to define values that can be controlled via the frontend and can be used within conditions of automation. Changes to the value stored in the text box generate state events. These state events can be utilized as `automation` triggers as well. + +```yaml +# Example configuration.yaml entries +input_text: + text1: + name: Text 1 + initial: Some Text + text2: + name: Text 2 + min: 8 + max: 40 + text3: + name: Text 3 + pattern: '[a-fA-F0-9]*' + test4: + name: Text 4 + initial: Can't Touch This + disabled: true +``` + +Configuration variables: + +- **[alias]** (*Required*): Alias for the text input. +- **min** (*Optional*): Minimum length for the text value. Default is `0`. +- **max** (*Optional*): Maximum length for the text value. Default is `100`. +- **name** (*Optional*): Friendly name of the text input. +- **initial** (*Optional*): Initial value when Home Assistant starts. Default is empty string. +- **pattern** (*Optional*): Regex pattern for client side validation. Default is empty string, which is treated same as `.*`. +- **disabled** (*Optional*): If set to true, disables making changes from the UI (but not by automations / REST / etc), displaying the value grayed out to indicate it is read-only in the UI. Default is false. From 9756c9e910834635cd40001de706d8ae80478b88 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 5 Sep 2017 09:04:49 -0700 Subject: [PATCH 2/2] Update version --- source/_components/input_text.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/input_text.markdown b/source/_components/input_text.markdown index 96548fe5a1eb..7e0c36944712 100644 --- a/source/_components/input_text.markdown +++ b/source/_components/input_text.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: home-assistant.png ha_category: Automation -ha_release: 0.54 +ha_release: 0.53 --- The `input_text` component allows the user to define values that can be controlled via the frontend and can be used within conditions of automation. Changes to the value stored in the text box generate state events. These state events can be utilized as `automation` triggers as well.