thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Localization issue with 2023.4.4 #109

Closed BoneheadFraggle closed 4 months ago

BoneheadFraggle commented 1 year ago

I have a localization that has worked fine until I updated to 2023.4.4 just now:

            {% if states[config.entity].last_changed is defined %} Poolpumpen är
            _(component.switch.state._.{{ states.switch.ip44plug02.state }}) men
            enligt schemat borde den vara _(component.switch.state._.{{
            states('input_boolean.poolpump_schedule_active') }}) {% endif %}

Now it looks like this: image

I'll downgrade to 2023.4.3, just thought I'd notify.

ildar170975 commented 1 year ago

Stopped working in 2023.4.4.

type: entities
entities:
  - type: custom:template-entity-row
    entity: person.ildar
    state: _(component.device_tracker.state._.{{states(config.entity)}})
  - type: custom:template-entity-row
    entity: sun.sun
    state: |
      {{'_(component.device_tracker.state._.not_home)'}}

image

Probably similar: https://github.com/benct/lovelace-multiple-entity-row/issues/292#issuecomment-1507232575

ildar170975 commented 1 year ago

Probably happened since localization key was changed:

{{'_(component.device_tracker.state._.not_home)'}}

must be changed to

{{'_(component.device_tracker.entity_component._.state.not_home)'}}

Example:

type: entities
entities:
  - type: custom:template-entity-row
    entity: person.ildar
    state: >-
      _(component.device_tracker.entity_component._.state.{{states(config.entity)}})
  - type: custom:template-entity-row
    entity: sun.sun
    state: |
      {{'_(component.device_tracker.entity_component._.state.not_home)'}}

изображение