Computed attribute translation

greendaysa year ago

Is it possible to have translations of a computed attribute name? If yes, what would the key in the language file look like?

Anton Tananaeva year ago

You mean position attributes? The known ones already have translations. If you mean custom attributes, then you can add it the same way we have it now for existing ones.

greendaysa year ago

I created a computed attribute "signal" and assigned an expression to it. It shows up fine on the device status card. Then, I added an entry in the en.json file following the same naming convention as existing attributes (e.g. battery -> "positionBattery"):

"positionSignal": "Dev Signal",

but it's still showing "signal" on the Status Card.

Anton Tananaeva year ago

Just adding the translation is not enough. Search the source code to see where you need to add the attribute.

greendaysa year ago

Got it... It worked. Thanks!