Help needed: st.zigbee.cluster_base understanding

Hey @nayelyz

the payload needs to be passed as byte string, which can easily done with cluster_base.build_manufacturer_specific_command() so that’s working now.

About my “Window Open Detection” capability:

I would like to show the current of a set of different states.
Since yet I’ve tried this with display type list which requires a setter/command to be displayed but this is not my intention here.

Is there a way to use the “state” display type instead but with the same batch of alternatives?
If yes how shoudl then the cap definition and it’s presentation look like?

CAP.json

{
  "name": "Window Open Detection",
  "attributes": {
    "windowOpenDetection": {
      "schema": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "enum": [
              "quarantine",
              "closed",
              "hold",
              "opened",
              "opened_alarm"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "value"
        ]
      },
      "enumCommands": [],
	  "setter": "setWindowOpenDetection"
    }
  },
  "commands": {
	  "setWindowOpenDetection": {
		  "name": "setWindowOpenDetection",
		  "arguments": [
			{
			  "name": "mode",
			  "optional": false,
			  "schema": {
				"type": "string",
				"enum": [
				  "quarantine",
				  "closed",
				  "hold",
				  "opened",
				  "opened_alarm"
				]
			  }
			}
		  ]
		}
	}
}

CAP_PRES.json

{
    "dashboard": {
        "states": [],
        "actions": [],
        "basicPlus": []
    },
	"detailView": [
	  {
		"label": "Window Open Detection",
		"displayType": "state",
		"state": {
			"label": "{{windowOpenDetection.value}}",
			"alternatives": [
			  {
				"key": "quarantine",
				"value": "Quarantine"
			  },
			  {
				"key": "closed",
				"value": "Closed"
			  },
			  {
				"key": "opened",
				"value": "Opened"
			  },
			  {
				"key": "hold",
				"value": "Opening or Closing ..."
			  },
			  {
				"key": "opened_alarm",
				"value": "Attention! Window was opened from the outside."
			  }
			]
		}
	  }
	],
	"automation": {
		"conditions": [
		  {
			"label": "Window Open Detection",
			"displayType": "list",
			"list": {
				"alternatives": [
					{
						"key": "quarantine",
						"value": "Quarantine"
					},
					{
						"key": "closed",
						"value": "Closed"
					},
					{
						"key": "opened",
						"value": "Opened"
					},
					{
						"key": "hold",
						"value": "Opening or Closing ..."
					},
					{
						"key": "opened_alarm",
						"value": "Attention! Window was opened from the outside."
					}
				],
				"value": "windowOpenDetection.value"
			}
		}],
		"actions": []
	  },
    "id": "preparestream40760.windowOpenDetection",
    "version": 1
}

Thank you in advance!