Skip to content

Commit

Permalink
Extend sitemap syntax for icon
Browse files Browse the repository at this point in the history
The icon value can now contain until 3 segments separated by a semi-column.
First segment is the icon source. Example: oh, if, iconify, material, ...
Second segment is the icon set (and can be empty). Example: classic
Third segment is the icon name (and can contain hyphen). Example: temperature

In case only two segments are provided, the icon source is assumed to be the openHAB server and the first segment is then the icon set and the second the icon name.
In case only one segment is provided, the icon source is assumed to be the openHAB server and its classic icon set and the value is then the icon name.

Ability to surround the value with simple or double quotes is kept for better backward compatibility.

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo committed Apr 11, 2023
1 parent 643fe49 commit 527ad75
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,17 @@ GroupItemRef:
ID;

Icon returns ecore::EString:
STRING | ID;
STRING | (IconSource ':' IconSet? ':' IconName) | (IconSet ':' IconName) | IconName;

IconSource:
ID;

IconSet:
ID;

// Allow hyphen inside an icon name
IconName:
(ID '-')* ID;

ColorArray:
((item=ID)? (condition=('==' | '>' | '<' | '>=' | '<=' | '!='))? (sign=('-' | '+'))? (state=XState) '=')?
Expand Down

0 comments on commit 527ad75

Please sign in to comment.