[ST Edge] Custom capabilities labels are ignored

I’ll keep an eye on these devices over the next day or so and see if they straighten out. Otherwise, you’re probably right that some sort of forced driver and or capability update may be required.

Ah sorry, I didn’t realize you already had the equivalent app update regarding your prior posts.

So both Android and iOS still have inconsistent labels. I don’t know what it is with these guys: are they really this incompetent or is it that they just don’t care?? :thinking:

Hi, guys

The team answered. They said that the rule for this kind of behavior is the following:

  1. If the capability name is defined, it will be shown as the capability title.
  2. If the capability name is not defined and there is a label, the label will be shown as the capability title

This change was made because they discovered that many custom capabilities didn’t have names defined.

I hope this information is helpful. If there is any other question regarding this, please let me know.

2 Likes

Hi @andresg thanks for the info

Well, I think they have chosen the wrong solution.

If some custom capabilities do not have a defined name, the defined label will be displayed. This is not logical

It would not be more correct: If there is a defined Label, it shows the name of the label.

In the names of the capabilities you can add abbreviations or numbers to differentiate them from other similar ones, since you cannot use versions of the capabilities.

On the other hand I do not agree that it is working as they say.
I have all the custom capabilities with defined names and some show the name of the capability and others show the name of the label.
It seems that there must be something else that they do not tell us or do not know why.

Example
legendabsolute60149.randomOnOff1: (in APP shown the label)
legendabsolute60149.randomOnOff2: (in APP shown the Capability Name)

id: legendabsolute60149.randomOnOff1
version: 1
status: proposed
name: Random On Off 1
ephemeral: false
attributes:
  randomOnOff:
    schema:
      type: object
      properties:
        value:
          type: string
          maxLength: 8
      additionalProperties: false
      required:
        - value
    setter: setRandomOnOff
    enumCommands: []
commands:
  setRandomOnOff:
    name: setRandomOnOff
    arguments:
      - name: value
        optional: false
        schema:
          type: string
          maxLength: 8
  • Capability presentation
{
    "dashboard": {
        "states": [
            {
                "label": "{{randomOnOff.value}}"
            }
        ],
        "actions": []
    },
    "detailView": [
        {
            "label": "Random On Off",
            "displayType": "switch",
            "switch": {
                "command": {
                    "name": "setRandomOnOff",
                    "on": "Active",
                    "off": "Inactive",
                    "argumentType": "string"
                },
                "state": {
                    "value": "randomOnOff.value",
                    "valueType": "string",
                    "on": "Active",
                    "off": "Inactive",
                    "label": "{{randomOnOff.value}}",
                    "alternatives": [
                        {
                            "key": "Active",
                            "value": "Active",
                            "type": "active"
                        },
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "inactive"
                        }
                    ]
                }
            }
        }
    ],
    "automation": {
        "conditions": [
            {
                "label": "Random On Off",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "Active",
                            "value": "Active",
                            "type": "active"
                        },
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "inactive"
                        }
                    ],
                    "value": "randomOnOff.value",
                    "valueType": "string"
                }
            }
        ],
        "actions": [
            {
                "label": "Random On Off",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "Active",
                            "value": "Active",
                            "type": "active"
                        },
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "inactive"
                        }
                    ],
                    "command": "setRandomOnOff",
                    "argumentType": "string"
                }
            }
        ]
    },
    "id": "legendabsolute60149.randomOnOff1",
    "version": 1
}
id: legendabsolute60149.randomOnOff2
version: 1
status: proposed
name: Random On Off 2
ephemeral: false
attributes:
  randomOnOff:
    schema:
      type: object
      properties:
        value:
          type: string
      additionalProperties: false
      required:
        - value
    enumCommands: []
commands:
  setRandomOnOff:
    name: setRandomOnOff
    arguments:
      - name: value
        optional: false
        schema:
          type: string
  • Capability presentation
{                                               
    "dashboard": {
        "states": [
            {
                "label": "{{randomOnOff.value}}"
            }
        ],
        "actions": []
    },
    "detailView": [
        {
            "label": "Timer Mode",
            "displayType": "list",
            "list": {
                "command": {
                    "name": "setRandomOnOff",
                    "alternatives": [
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "active"
                        },
                        {
                            "key": "Random",
                            "value": "Random",
                            "type": "active"
                        },
                        {
                            "key": "Program",
                            "value": "Program",
                            "type": "active"
                        }
                    ],
                    "argumentType": "string"
                },
                "state": {
                    "value": "randomOnOff.value",
                    "valueType": "string",
                    "alternatives": [
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "active"
                        },
                        {
                            "key": "Random",
                            "value": "Random",
                            "type": "active"
                        },
                        {
                            "key": "Program",
                            "value": "Program",
                            "type": "active"
                        }
                    ]
                }
            }
        }
    ],
    "automation": {
        "conditions": [
            {
                "label": "Timer Mode",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "active"
                        },
                        {
                            "key": "Random",
                            "value": "Random",
                            "type": "active"
                        },
                        {
                            "key": "Program",
                            "value": "Program",
                            "type": "active"
                        }
                    ],
                    "value": "randomOnOff.value",
                    "valueType": "string"
                }
            }
        ],
        "actions": [
            {
                "label": "Timer Mode",
                "displayType": "list",
                "list": {
                    "alternatives": [
                        {
                            "key": "Inactive",
                            "value": "Inactive",
                            "type": "active"
                        },
                        {
                            "key": "Random",
                            "value": "Random",
                            "type": "active"
                        },
                        {
                            "key": "Program",
                            "value": "Program",
                            "type": "active"
                        }
                    ],
                    "command": "setRandomOnOff",
                    "argumentType": "string"
                }
            }
        ]
    },
    "id": "legendabsolute60149.randomOnOff2",
    "version": 1
}
  • App screenshot: Capability Name Random On Off 2 Appears and It should show Label: Timer Mode

1 Like

What I have never understood is why on earth they started using the capability names in the first place. Surely the whole point of there being a label name was to use it as the label? If I wanted to see the capability name in the label I would have put it in the label.

I seem to vaguely remember it was all to do with multi-attribute custom capabilities. All I ever wanted to be able to do with those is use more than one of the attributes in the presentation in the same way I would do multiple single attribute capabilities. There is no more reason to group attributes from the same capability together than there is to arbitrarily group separate single attribute capabilities together (so please stop displaying temperature and humidity together without asking, they could be from sensors in two different continents).

3 Likes

I agree. The rules make zero sense to me. If there is a label defined in the presentation detail section, then that should be used. Why would you ever use the name over the label if the label is provided??! But that is what they did, as evidenced by ALL the existing devices before I had to modify the capability presentations to change the provided label to a {{i18n.label}}.