lovelace-template-entity-row
lovelace-template-entity-row copied to clipboard
Localization: how to pass a <key> into a <key>
This code shows a localized "Home" or "Away" strings:
- type: custom:template-entity-row
entity: person.ildar
name: localized
state: _(component.device_tracker.state._.{{states(config.entity)}})
Here component.device_tracker.state._.home
and component.device_tracker.state._.not_home
keys are used.
Some keys have "internal" keys, like:
ui.errors.config.key_missing: "Required key ''{key}'' is missing.”
To show the whole message, I need to pass a "key" into it.
How should I combine the _(ui.errors.config.key_missing)
and this "internal" key?
Potentially may be closed by this PR: https://github.com/thomasloven/lovelace-template-entity-row/pull/85
Fixed by #85