Hi all,
I added into my config locale: nl for the language settings.
It all works fine however the on/off on my switch is not changing to the new language. how come and where can i find this variable?
Locale : nl language not changing switch
Hi all,
I added into my config locale: nl for the language settings.
It all works fine however the on/off on my switch is not changing to the new language. how come and where can i find this variable?
@stingone said:
It all works fine however the on/off on my switch is not changing to the new language.
You can defined your own mapping as part of the device configuration using “xOnLabel” and “xOffLabel”. The example below is for a “HomeduinoRFSwitch”. It should also work for other switch device types. Make sure to “Reload” the pimatic frontend in the browser after you have applied the changes.
{
"id": "rfSwitch",
"name": "Schakelaar",
"class": "HomeduinoRFSwitch",
"xOnLabel": "in",
"xOffLabel": "uit",
"protocols": [
{
"name": "switch2",
"options": {
"houseCode": 17,
"unitCode": 0
}
}
]
},
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Is that the same for the state value on the variable devices?
Just tried to use xPresentLabel on the variable device but not working
@stingone No, I don’t think this will work for the VariablesDevice as it only supports String and Number attribute types. Thus, a switch state would be transformed to “true”|“false” or 1|0 depending on the chosen data type for the variable.
{
"variables": [
{
"name": "switchState",
"expression": "$rfSwitch.state",
"type": "string"
}
],
"id": "switchStateDevice",
"name": "Switch State",
"class": "VariablesDevice"
},
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Thanks. I had the same “issue” for devices of class "GPIOswitch"
That one also says On/Off and with the xOnLabel/xOffLabel I now know finally what it means
Is there any other way to display the status of in my case a switch with custom labels?
@stingone said:
Is that the same for the state value on the variable devices?
In my eyes its an important requirement.
Can someone create a feature request please.