lovelace-template-entity-row icon indicating copy to clipboard operation
lovelace-template-entity-row copied to clipboard

Localization: how to pass a <key> into a <key>

Open ildar170975 opened this issue 2 years ago • 1 comments

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?

ildar170975 avatar Jul 20 '22 06:07 ildar170975

Potentially may be closed by this PR: https://github.com/thomasloven/lovelace-template-entity-row/pull/85

ildar170975 avatar Sep 18 '22 14:09 ildar170975

Fixed by #85

thomasloven avatar Feb 11 '24 20:02 thomasloven