openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[homeconnect] Translate operation states #16833

Open mueller-ma opened 1 month ago

mueller-ma commented 1 month ago

The operation states of Homeconnect devices are in English and not translatable via Crowdin. I could add a custom MAP file, but IMO it would be a better UX if the binding does the translation. There are only a few fixed states, so this shouldn't be too much work:

{
    "data": {
        "key": "BSH.Common.Status.OperationState",
        "value": "BSH.Common.EnumType.OperationState.Run",
        "type": "BSH.Common.EnumType.OperationState",
        "constraints": {
            "allowedvalues": [
                "BSH.Common.EnumType.OperationState.Inactive",
                "BSH.Common.EnumType.OperationState.Ready",
                "BSH.Common.EnumType.OperationState.DelayedStart",
                "BSH.Common.EnumType.OperationState.Run",
                "BSH.Common.EnumType.OperationState.Pause",
                "BSH.Common.EnumType.OperationState.ActionRequired",
                "BSH.Common.EnumType.OperationState.Finished",
                "BSH.Common.EnumType.OperationState.Error",
                "BSH.Common.EnumType.OperationState.Aborting"
            ],
            "access": "read"
        }
    }
}

Your Environment

lolodomo commented 1 month ago

I guess it should be added as options to the channel type https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.homeconnect/src/main/resources/OH-INF/thing/thing-types.xml#L363

lolodomo commented 1 month ago

To be checked if this list is not built dynamically.