thomasloven / lovelace-template-entity-row

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

using it with Cover #117

Closed Winzy54 closed 5 months ago

Winzy54 commented 5 months ago

hello. i used the custom:template-entity-row and it looks very good. but when i used it for seconday on my cover, i lose the ability to change the cover position.

thats the code i used: entity: cover.stairs type: custom:template-entity-row secondary: >- {% if is_state(‘binary_sensor.stairs’, ‘on’)%} Window is Open {% else %} Window is Closed {% endif %}

when i dont use the custom:template-entity-row then on the stairs window i also have the option to move the cover like the “Middle” cover.

image

ildar170975 commented 5 months ago
  1. You posted an unformatted code which cannot be analysed, you should have noticed it by yourself.
  2. The template-entity-row card is not supposed to show controls. It is meant to show templated name, icon, state, secondary-info & some other options (whole list in Docs) of a standard entity-row.
Winzy54 commented 5 months ago

hi. first of all thanks for your answer. I am a real Newbie to HA and github, so sorry about my post.

and i thought the main entity could stay as normal (with control) and i could use template entity row only for the secondary info. did i understand it wrong ?

Winzy54 commented 5 months ago

Here is the whole code for it. hope i posted it correctly now

type: entities
entities:
  - entity: cover.stairs
    type: custom:template-entity-row
    secondary: >-
      {% if is_state('binary_sensor.stairs', 'on')%} Window is Open {% else %}
      Window is Closed {% endif %}
  - entity: cover.middle
  - entity: cover.kitchen_2
  - entity: binary_sensor.kitchen
show_header_toggle: true
title: Living Room
state_color: true
ildar170975 commented 5 months ago

and i thought the main entity could stay as normal (with control) and i could use template entity row only for the secondary info.

No, the whole row is different. Try custom:secondaryinfo-entity-row. It will give you buttons & templated secondary_info.

Winzy54 commented 5 months ago

thank you again. so i installed the Card Tools and the secondaryinfo-entity-row

but i cant seems to use it. it says it cant find the card.

i didnt do this because i those it will be automatically. ( how can i check if the lovelace is updated with this?) 3) Update the Lovelace configuration to use the plugins resources: url: /hacsfiles/card-tools.js type: module url: /hacsfiles/secondaryinfo-entity-row.js type: module

ildar170975 commented 5 months ago

Your question is not related to template-entity-row. Suggest to close the issue & ask all questions related to secondaryinfo-entity-row in it's repo )

Winzy54 commented 5 months ago

will do. thanks.