[sitemap] document new input element (#2012)
* sitemap input element Signed-off-by: Mark Herwege <mark.herwege@telenet.be> * Update ui/sitemaps.md Signed-off-by: Jerome Luckenbach <github@luckenba.ch> --------- Signed-off-by: Mark Herwege <mark.herwege@telenet.be> Signed-off-by: Jerome Luckenbach <github@luckenba.ch> Co-authored-by: Jerome Luckenbach <github@luckenba.ch>pull/2018/head
parent
e0f55cf610
commit
94cf65c750
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -150,6 +150,7 @@ The following element types may be used in a Sitemap definition file.
|
|||
| [Frame](#element-type-frame) | Establishes an area containing various other Sitemap elements. |
|
||||
| [Group](#element-type-group) | Concentrates all elements of a given group in a nested block. |
|
||||
| [Image](#element-type-image) | Renders an image given by an URL. |
|
||||
| [Input](#element-type-input) | Renders an input field for text or numbers. |
|
||||
| [Mapview](#element-type-mapview) | Displays an OSM map based on a given Location Item. |
|
||||
| [Selection](#element-type-selection) | Provides a dropdown or modal popup presenting values to choose from for an Item. |
|
||||
| [Setpoint](#element-type-setpoint) | Renders a value between an increase and a decrease buttons. |
|
||||
|
@ -381,6 +382,28 @@ Colorpicker item=LR_LEDLight_Color label="LED Light Color" icon="colorwheel"
|
|||
|
||||
![Presentation of the Colorpicker element in BasicUI](images/sitemap_demo_colorpicker.png)
|
||||
|
||||
### Element Type 'Input'
|
||||
|
||||
```java
|
||||
Input item=<itemname> [label="<labelname>"] [icon="<iconname>"]
|
||||
```
|
||||
|
||||
This element allows entering of text or numbers and updating the underlying items.
|
||||
This can for example be useful to update manually collected meter readings and storing the information in an item.
|
||||
Text, number or number with unit values can be updated in the respective item types.
|
||||
[Formatting](/docs/configuration/items.html#item-label) in the label parameter will format the current value, but the value update will be as entered in the field.
|
||||
E.g. this makes it possible to use formatting like `[%.0f %unit%]` to show the current value without fractions, but still update to whatever is entered.
|
||||
|
||||
Note that this element type may not be supported on all user interfaces that support sitemaps.
|
||||
|
||||
**Example:**
|
||||
|
||||
```java
|
||||
Input item=Meter_Reading label="Meter [%.0f %unit%]" icon="energy"
|
||||
```
|
||||
|
||||
![Presentation of the Input element in BasicUI](images/sitemap_demo_input.png)
|
||||
|
||||
### Element Type 'Webview'
|
||||
|
||||
```java
|
||||
|
|
Loading…
Reference in New Issue