openhab-core/bundles/org.openhab.core.model.sitemap
lolodomo b40e6db514
Extend sitemap syntax for switch to support press & release buttons (#4183)
* Extend sitemap syntax for switch to support press & release buttons

Mappings attribute for switch element now accepts one or two commands for each button.
If only one command is provided, the button is a click button, the command is sent to the item when the button is clicked.
If two commands are provided (separated by ":"), the button is a press & release button, the first command is sent to the item when the button is pressed and the second when the button is released.

Syntax example for a click button: Switch item=DemoSwitch mappings=[ ON="ON" ]
Syntax example for a press & release button: Switch item=DemoSwitch mappings=[ ON:OFF="ON" ]

Related to #3822

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-05 09:45:24 +02:00
..
src/org/openhab/core/model/sitemap Extend sitemap syntax for switch to support press & release buttons (#4183) 2024-05-05 09:45:24 +02:00
.classpath Update Eclipse .classpath files (#3250) 2022-12-22 14:14:35 +01:00
.gitignore mavenize openHAB and integrate mavenized ESH repository (#467) 2019-01-28 13:07:31 +01:00
.project mavenize openHAB and integrate mavenized ESH repository (#467) 2019-01-28 13:07:31 +01:00
bnd.bnd Upgrade to Karaf 4.4.5 and Xtext 2.34 (#4133) 2024-03-17 09:41:15 +01:00
model.profile-marker mavenize openHAB and integrate mavenized ESH repository (#467) 2019-01-28 13:07:31 +01:00
NOTICE Updated NOTICE files to openHAB (#578) 2019-02-15 10:46:18 +01:00
plugin.xml Renamed packages 2019-12-28 12:18:16 +01:00
pom.xml Apply spotless after release, resolve bundles (#3953) 2023-12-22 23:14:28 +01:00