hoobs-org / hoobsd

Server component for the certified HOOBS smart home stack.
GNU General Public License v3.0
8 stars 4 forks source link

Form Schema JSON Capabilities - Grouped Checkbox Arrays as Unique Items #95

Open mkormendy opened 3 years ago

mkormendy commented 3 years ago

As a user, I am noticing a number of features that are not in parity with the native Homebridge implementation of the config.schema.json for the form based configuration user interface.

This issue deals with an array of unique items as Checkboxes. See the following block of code:

"triggerableModes": {
  "title": "Triggerable Modes",
  "description": "Choose which modes (0 = Home/Stay, 1 = Away, 2 = Night) this sensor will trigger the security system alarm.<br>If \"Home\" and/or \"Night\" mode are deselected for all sensors and switches, then the HomeKit app will hide those two modes from the app's Security System accessory control.<br><br>NOTE: when setting up Konnected panels with most traditional security systems, the \"Home\" and/or \"Night\" modes don't operate bi-directionally and should be deselected for all sensors and switches.<br>",
  "type": "array",
  "uniqueItems": true,
  "items": {
    "title": "Mode",
    "type": "string",
    "enum": [
      "0",
      "2",
      "1"
    ],
    "enumNames": [
      "Home",
      "Night",
      "Away"
    ]
  }
}

This produces the expected output here in Homebridge:

Screen Shot 2021-07-20 at 12 01 12 AM

However in HOOBS it produces this:

Screen Shot 2021-07-20 at 12 01 37 AM

This isn't a showstopper but, there is a critical problem where the user can continually add more than the possible 3 triggerable mode items using the (+) button, and using a limiting property doesn't seem to have any effect here.