OH3 Which commands are available for actions in sitemap?

  • Platform information:
    • Hardware: Raspberry Pi 4
    • OS: openhabian 3.0.0
    • Java Runtime Environment: openjdk version “11.0.9”
    • openHAB version: 3.0.0
  • Issue of the topic:

I am wondering how to figure out which commands are available for an Item.
In this example for my Xiaomi Vacuum Control I would like to label the commands for my sitemap.

The problem is, I don’t know the available commands.

My guess was I can check it from the Item itself, which shows the following options:

Screenshot 2021-01-23 181946

This results in an error in the Sitemap:

Error: Syntax error at line 2 col 138:

      Switch icon="switch" label="Befehle" item=ArchyXiaomiMiRoborock_ControlVacuum mappings=[Vacuum="Start",Pause="Pause",Dock="Dock",Spot 
                                                                                                                                           ^
Unexpected WS token: " ". Instead, I was expecting to see one of the following:

The space of the “Spot Clean” causes the error. The problem is that I still don’t know the available commands.

If manually editing sitemap files, you’d use quotes
… mappings=[Vacuum=“Start”,“Spot Clean”=“whatever”, …
Don’t know what you do in UI editing, you could try just that, quote marks.

OK. This is my sitemap code:

sitemap page_eebb7acf91 label="Archy" {
    Switch icon="switch" label="Befehle" item=ArchyXiaomiMiRoborock_ControlVacuum mappings=[Vacuum="Start",Pause="Pause",Dock="Dock",Spot Clean="Hier"]
    Switch icon="fan" label="Saugleistung" item=ArchyXiaomiMiRoborock_ControlFanLevel mappings=[Silent="Leise",Standard="Normal",Turbov2="Stark",Maxv2="Max"]

continued by more lines of course…

And this is the error message:

Error: Syntax error at line 2 col 138:

      Switch icon="switch" label="Befehle" item=ArchyXiaomiMiRoborock_ControlVacuum mappings=[Vacuum="Start",Pause="Pause",Dock="Dock",Spot 
                                                                                                                                           ^
Unexpected WS token: " ". Instead, I was expecting to see one of the following:

A equals token based on:
    Mapping → MappingCommand ● %equals MappingLabel
    Mappings → Mappings _ %comma _ ● Mapping
    WidgetAttrValue → %lbracket _ ● Mappings _ %rbracket
    WidgetAttr → WidgetAttrName ● WidgetAttrValue
    WidgetAttrs → WidgetAttrs _ ● WidgetAttr
    Widget$ebnf$1 → Widget$ebnf$1 ● WidgetAttrs
    Widget → %nlwidget _ ● Widget$ebnf$1
    Widgets →  ● Widget
    Sitemap → %sitemap _ SitemapName __ SitemapLabel __ %lbrace _ ● Widgets _ %rbrace
    Main → _ ● Sitemap _