Closed ChristophCaina closed 4 months ago
You said "translations are not working" - but you did not use a localization.
I suggest you to ask questions in the Community in a dedicated thread and leave Github for bugs, FRs & PRs. Check this example:
type: entities
entities:
- cover.garage_door
- type: custom:template-entity-row
entity: cover.garage_door
name: Door
state: My door is _(component.cover.state._.{{states(config.entity)}})
Hi, thanks... I haven't seen this information - else, I would not have posted an issue :)
What I don't really understand - why can't the localization be done directly from the mod?
Anyway, thanks for the information :)
why can't the localization be done directly from the mod?
This is a part of the mod.
can be closed
It cannot be done directly by the row because it cannot read your mind. The purpose of this is to display a line with exactly the information you put there, and as little magic as possible.
Sure, most of the time, if you put an entity you'd want the translated state. Except where you don't, and what then?
Another Issue I've just noticed is related to translated states of an entity.
I want to use the template-entity-row for a door-handle sensor. This sensor can have the following states:
closed / opened / tilted
While using the entity in a normal entities card, the state will be translated into my UI language just as expected. As soon, as I use the template-entity-row on this entity, the state will be shown in language:
Card with enabled template-entity - the last entity is with applied template:![grafik](https://user-images.githubusercontent.com/26391061/197508506-fbb6b3c7-a96e-4b53-bc5e-86a7a0818b62.png)
Card with the same entity applied with - and without template:![grafik](https://user-images.githubusercontent.com/26391061/197508556-e2eb8535-2656-4ea1-863e-11d284df1438.png)
It would be nice, if the entity row would support the built in UI translation. I know, I could change that by adding an if / else to the 'state'... but that will cause issues, when someone would change the UI language in the user-settings.