openhab-core
openhab-core copied to clipboard
[sitemap] Buttongrid as container for new Button elements
The proposed syntax for the Button is :
Button item=<item> [label=<label>] [icon=<icon>] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]
Button item=<item> [label=<label>] [staticIcon=<icon>] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]
Button item=<item> [label=<label>] [icon=[...]] row=<row> column=<column> [stateless] click=<cmd> [release=<cmd>] [labelcolor=[...]] [iconcolor=[...]] [visibility=[...]]
Explanations of the parameters:
- The position of the button in the grid is defined by the
rowandcolumnparameters. - The
labelparameter defines the text to display in the button. If not present, the value of the command (clickparameter) is used as text. - The
iconparameter defines the icon to display in the button. If not present, the button will contain a text. The icon can be dynamic by defining rules in theiconparameter. - By default, a button is stateful. It is stateless if
statelessparameter is present. - A button is a click button by default, the command to send to the item is defined by the
clickparameter. Press & release behaviour is possible by setting theclickandreleaseparameters. - Label and icon color can be dynamic using the
labelcolorandiconcolorparameters. - Visibility of the button can be dynamic using the
visibilityparameter.
Such Button element is valid only inside a Buttongrid element.