Missing item type: Selection list / Switch with mapping definition

I am defining items to control a heating system and am missing the “Selection” type item. It could be the simple “Yes/No” selection to set operation and configuration parameters or a selection from much longer list of possible settings like Operating Mode = “Protection | Reduced | Comfort | Automatic”.
When I look at the sitemap syntax, I find Selection and Switch statements with possible mappings. However, I’d like to mix these with items to be displayed on the same screen and have not come up with an idea how I could do that. Maybe the example below can illustrate my thought (maybe I don’t see the forest for the trees).

If there is no native Item type implementation, can someone suggest a work-around to define such an Item? I would like to insert this type of an item wetween “Number type” and “Switch type” items, etc. in the same menu/screen. Example:

my.items file:
// List of categories to select from
Group gRadiators // click opens the list of radiator commands below
Group gFloorHeating // click opens the list of floor heating commands below
(etc.)

// One screen for the radiator circuit category
Number ComfortSetpoint_Rad "Setpoint comfort radiators [%.1f degC] (gRadiators) {my=“command001”}
Number ReducedSetpoint_Rad "Setpoint reduced radiators [%.1f degC] (gRadiators) {my=“command002”}
Selection Mode_Rad “Operating mode radiators” [mappings=“mapping definition>”]
Number …

// Another screen for the floor heating category
Number ComfortSetpoint_Floor "Setpoint comfort floor heating [%.1f degC] (gFloorHeating) {my=“command011”}
Number ReducedSetpoint_Floor "Setpoint reduced floor heating [%.1f degC] (gFloorHeating) {my=“command012”}
Selection Mode_Floor “Operating mode floor heating” [mappings=“mapping definition>”]
Number …

Remark: The Switch item is a specialized implementation of a selection, one which is limited to two states named ON and OFF. Is it difficult to ask for a more general implementation with (a) more selections and (b) where the states can be assigned arbitrary labels?

Hi @brhar,

i am not sure if i understand correctly what you want to do, but “… I’d like to mix these with items to be displayed on the same screen …” is possible with frames in the sitemap. Don’t use the groups, take a look here:
http://docs.openhab.org/configuration/sitemaps.html

Put youre items manually together in one frame (same screen)

Frame label="Demo" {
        Group item=Heating
        Switch item=Lights icon="big_bulb" mappings=[OFF="All Off"]
        Text item=Temperature valuecolor=[>25="orange",>15="green",<=15="blue"]
        Text item=Multimedia_Summary label="Multimedia" icon="video" {
            Selection item=TV_Channel mappings=[0="off", 1="DasErste", 2="BBC One", 3="Cartoon Network"]
            Slider item=Volume

check the sections:

Element Type ‘Switch’

Switch item=<itemname> [label="<labelname>"] [icon="<iconname>"] [mappings="<mapping definition>"]

Element Type ‘Selection’

Selection item=<itemname> [label="<labelname>"] [icon="<iconname>"] [mappings="<mapping definition>"]

Matthias

Thank you for your response, Matthias! Sorry if I did not make myself clear enough.
I have a sitemap file

[code]
sitemap siemensbsbus label=“BS-Bus Heizung”
{
Frame label=“Date” {
Text item=Date
}

Frame label="Kategorie" {
    Group item=gUhrzeitDatum            label="Datum und Zeit setzen"         icon="calendar"
    Group item=gZeitprogramm_HK1        label="Zeitprogramm Heizkreis 1"     icon="clock-on"
    Group item=gZeitprogramm_HK2        label="Zeitprogramm Heizkreis 2"     icon="clock-on"
    Group item=gZeitprogramm4_TWW        label="Zeitprogramm Trinkwasser"     icon="clock-on"
    Group item=gZeitprogramm5            label="Zeitprogramm 5"                 icon="clock-on"
    Group item=gFerienHK1                label="Ferien Heizkreis 1"             icon="calendar"
    Group item=gFerienHK2                label="Ferien Heizkreis 2"             icon="calendar"
    Group item=gHeizkreis1                 label="Einstellungen Heizkreis 1" icon="heating"
    Group item=gHeizkreis2                 label="Einstellungen Heizkreis 2" icon="heating"
    Group item=gTrinkwasser             label="Einstellungen Trinkwasser" 
    Group item=gTrinkwasserspeicher     label="Einstellungen Trinkwasserspeicher"    icon="cistern-80"
    Group item=gWartungSonderbetrieb    label="Wartung/Sonderbetrieb"
    Group item=gStatus                     label="Status"
    Group item=gDiagnoseErzeuger        label="Diagnose Erzeuger"
} // end of Frame label="Kategorie"

//Switch item=language mappings=[0=“German” 1=“English”]

} // sitemap siemensbsbus
[/code/

and an items file (excerpt of Heizkreis 1)

/*
 * GROUP DEFINITIONS
 * There are several authorization levels of commands; they are in descending
 * order: OEM, Expert, Install, User.  Commands can be sorted into one of 
 * these groups.
 * Some more group definitions help to bring order into the commands.
 */

// Hierarchy levels
Group    gAll
Group    gOEM                // OEM
Group    gF        (gOEM)    // Fachmann
Group    gI        (gF)        // Installation
Group    gE        (gI)        // Endbenutzer

// ****************************************************
// Categories as defined in the manufacturer manuals
// ****************************************************
Group    gUhrzeitDatum
Group    gBedieneinheit
Group    gFunk
Group    gZeitprogramm_HK1
Group    gZeitprogramm_HK2
Group    gZeitprogramm_HK3
Group    gZeitprogramm4_TWW
Group    gZeitprogramm5
Group    gFerien_HK1
//Group    gKuehlkreis1
Group    gFerien_HK2
Group    gFerien_HK3
Group    gHeizkreis1
Group    gHeizkreis2
Group    gHeizkreis3
Group    gTrinkwasser
(more ...)

// Heizkreis 1                     710 - 900
Number    Komfortsollwert_HK1           "Komfortsollwert HK1 [%.1f °C]"             <temperature>    (gHeizkreis1,gE)     {siemensbsbus="710"}
Number    Reduziertsollwert_HK1         "Reduziertsollwert HK1 [%.1f °C]"           <temperature>    (gHeizkreis1,gE)    {siemensbsbus="712"}
Number    Frostschutzsollwert_HK1       "Frostschutzsollwert HK1 [%.1f °C]"         <temperature>    (gHeizkreis1,gE)     {siemensbsbus="714"}
Number    KennlinieSteilheit_HK1        "Kennlinie Steilheit HK1 [%.2f]"            <line2>           (gHeizkreis1,gE)     {siemensbsbus="720"}
Number    KennlinieVerschiebung_HK1     "Kennlinie Verschieb HK1 [%.1f °C]"          <line3>             (gHeizkreis1,gF)     {siemensbsbus="721"}
Switch    KennlinieAdaption_HK1        "Kennlinie Adaption HK1"                                        (gHeizkreis1,gE)    {siemensbsbus="726"}
Number    SommerWinterHeizgrenze_HK1    "Sommer/Winterheizgrenze HK1 [%.1f °C]"    <temperature>    (gHeizkreis1,gE)     {siemensbsbus="730"}
Number    TagesHeizgrenze_HK1            "Tagesheizgrenze HK1 [%.1f °C]"                <temperature>    (gHeizkreis1,gF)     {siemensbsbus="732"}
Number    VorlaufsollMinimum_HK1        "Vorlaufsollwert Minimum HK1 [%.1f °C]"    <temperature>    (gHeizkreis1,gF)     {siemensbsbus="740"}
Number    VorlaufsollMaximum_HK1        "Vorlaufsollwert Maximum HK1 [%.1f °C]"    <temperature>    (gHeizkreis1,gF)     {siemensbsbus="741"}
Number    Raumeinfluss_HK1                "Raumeinfluss HK1 [%.1f %%]"                    <temperature>    (gHeizkreis1,gI)     {siemensbsbus="750"}
Number    RaumtempBegrenzung_HK1        "Raumtemperaturbegrenzung HK1 [%.1f °C]"    <temperature>    (gHeizkreis1,gF)     {siemensbsbus="760"}
Number    Schnellaufheizung_HK1        "Schnellaufheizung HK1 [%.1f °C]"            <temperature>    (gHeizkreis1,gF)     {siemensbsbus="770"}
//Selection Schnellabsenkung_HK1        "Schnellabsenkung HK1"                                        (gHeizkreis1,gF)     {siemensbsbus="780"}
Number    EinschaltoptngMax_HK1        "Einschaltoptimierung Max HK1 [%.1f min]"                        (gHeizkreis1,gF)     {siemensbsbus="790"}

and here are the screenshots how I picture the result

I would like to see

  1. An overview of categories on an entry screen to select from; the “Group” keyword in sitemaps does that
  2. An overview of parameters to read and set in each category (“Items” in my understanding). There are parameters which assume values from an exactly defined set. But Items don’t offer selection lists to represent this behavio(u)r.
  3. I would love to use the Item transform feature which resorts to .map files (see https://github.com/openhab/openhab/wiki/Explanation-of-items) to display a numerically received Item status or to select one of several options from a textual list and send it as a numerical value. Those .map files come in handy when selection lists become quite large with around 50 possibilities.
    However, .map files are not mentioned in the sitemap syntax.

With all that “somewhere” already existent, I am missing such features when I look at Items. I wonder if this one application is so unique or if not other appliances display a similar behavio(u)r. Maybe someone has come up with a smart solution (or OpenHAB could extend its functionality, hint, hint)