Skip to content

Commit 7c2602a

Browse files
BioSehnsuchtballoob
authored andcommitted
Add input_text component (home-assistant#3301)
* Add input_text component * Update version
1 parent 64915d7 commit 7c2602a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: page
3+
title: "Input Text"
4+
description: "Instructions how to integrate the Input Text component into Home Assistant."
5+
date: 2016-03-15 06:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: home-assistant.png
11+
ha_category: Automation
12+
ha_release: 0.53
13+
---
14+
15+
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.
16+
17+
```yaml
18+
# Example configuration.yaml entries
19+
input_text:
20+
text1:
21+
name: Text 1
22+
initial: Some Text
23+
text2:
24+
name: Text 2
25+
min: 8
26+
max: 40
27+
text3:
28+
name: Text 3
29+
pattern: '[a-fA-F0-9]*'
30+
test4:
31+
name: Text 4
32+
initial: Can't Touch This
33+
disabled: true
34+
```
35+
36+
Configuration variables:
37+
38+
- **[alias]** (*Required*): Alias for the text input.
39+
- **min** (*Optional*): Minimum length for the text value. Default is `0`.
40+
- **max** (*Optional*): Maximum length for the text value. Default is `100`.
41+
- **name** (*Optional*): Friendly name of the text input.
42+
- **initial** (*Optional*): Initial value when Home Assistant starts. Default is empty string.
43+
- **pattern** (*Optional*): Regex pattern for client side validation. Default is empty string, which is treated same as `.*`.
44+
- **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.

0 commit comments

Comments
 (0)