enum device metrics in module.json?

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
piet66
Posts: 267
Joined: 04 Feb 2017 17:00

enum device metrics in module.json?

Post by piet66 »

Hello,
is it possible to enum the metric names of a special device in module.json? I want to give the operator a list of possible metric names depending on a choosen device. But I didn't found any solution. :(

At the moment the metric is entered as a string. My module.json looks like this:

Code: Select all

"sensors" : {
    "items" : {
        "fields" : {
            "device": {
                "label" : "__device-label__",
                "helper" : "__device-helper__",
                "type": "select",
                "datasource": "namespaces",
                "field": "optionLabels",
                "optionLabels": "namespaces:devices_sensorMultilevel:deviceName"
            },
           "metric" : {
               "label" : "__metric-label__",
               "helper" : "__metric-helper__"
          }
and

Code: Select all

"sensors" : {
    "items" : {
        "properties" : {
            "device": {
                "field": "enum",
                "datasource": "namespaces",
                "enum": "namespaces:devices_sensorMultilevel:deviceId",
                "required": true
    	    },
           "metric" : {
               "type" : "string",
               "required" : false,
               "default" : "level"
           }
piet66
Posts: 267
Joined: 04 Feb 2017 17:00

Re: enum device metrics in module.json?

Post by piet66 »

Nobody knows?
It would already be helpful, if anybody can tell, it's possible or it's not possible.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v4.1.2 from 2023-10-18 03:34:26 +0300
Post Reply