thomasloven / lovelace-template-entity-row

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

A few minor issues to be in parity with default lovelace #6

Closed dooz127 closed 4 years ago

dooz127 commented 4 years ago
  1. Title capitalize text-based state:

image

  1. Use 'pretty' text state for persons

image

  1. 'Active' option does not appear to work on entities that are not switches or binary sensors. It was working on the previous iteration of template-entity-row.

image

entities:
  - entity: person.duy_nguyen
  - entity: person.duy_nguyen
    active: true
    icon: '{{ state_attr(''person.duy_nguyen'',''icon'') }}'
    type: 'custom:template-entity-row'
  - entity: switch.front_door_light
    active: true
    type: 'custom:template-entity-row'
show_header_toggle: false
title: Template-entity-row Test
type: entities
thomasloven commented 4 years ago

1 and 2 would require me to make one special case for each type of entity, and is not the point of this row anyway. If you want to display the state of something that normally doesn't, use type: custom:hui-text-entity-row instead.

thomasloven commented 4 years ago

Changing the color of the icon can be achieved with card-mod.

dooz127 commented 4 years ago

Where does the code default lovelace use to render text reside? I just want to be at parity with default lovelace so that only the attributes I explicitly define when using template-entity-row are the values that change but every other attribute remains default lovelace. Is this a translation issue? Like do I have to map 'home' to 'Home' and 'not_home' to 'Away' in some translation file?

image

dooz127 commented 4 years ago

Dev docs are not very helpful other than saying that lokaliser is used as the translation management tool:

https://developers.home-assistant.io/docs/en/internationalization_index.html

dooz127 commented 4 years ago

Hmm, hass doesn't appear to support jinja trans blocks and there is no hass template extension for localization/internationalization. Should I make a feature request to the homeassistant-polymer github to add a localization/internationalization filter or function?