We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to use paper-buttons-row inside a button-card template (I need 7 identical cards, only entity changes). Like this:
paper-buttons-row
button-card
button_card_templates: irrigation_button: entity: binary_sensor.irrigation_unlimited_c1_z1 icon: | ... custom_fields: subtext: | ... row_buttons: card: type: custom:paper-buttons-row # ADD GLOBAL ENTITY FIELD HERE preset: mushroom base_config: preset: mushroom entity: binary_sensor.irrigation_unlimited_c1_z1 # Button-card can't set entity here! buttons: - icon: mdi:timer-play-outline name: | {% set next_duration = state_attr(config.entity, 'next_duration') %} {% if next_duration %} {{ next_duration.split(':')[1] }} {% else %} 0 {% endif %} - icon: mdi:play layout: icon - icon: mdi:cancel layout: icon
So button-card can't set the entity id in a custom field, but it does set entity id at a root level.
Add a global entity field at card's root level (as most cards have) that is passed down to each button if no other entity is provided.
entity
This:
type: custom:paper-buttons-row entity: binary_sensor.irrgation_unlimited_c1_z1 # global entity field here, passed down to each button preset: mushroom base_config: preset: mushroom buttons: - icon: mdi:timer-play-outline - icon: mdi:play layout: icon - icon: mdi:cancel layout: icon
would work just as this other example:
type: custom:paper-buttons-row preset: mushroom base_config: preset: mushroom entity: binary_sensor.irrigation_unlimited_c1_z1 buttons: - icon: mdi:timer-play-outline - icon: mdi:play layout: icon - icon: mdi:cancel layout: icon
I haven't found any way of dinamically set the entity id inside base_config field.
base_config
Other solutions like lovelace-gen are too heavy, I think.
lovelace-gen
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
I'm trying to use
paper-buttons-row
inside abutton-card
template (I need 7 identical cards, only entity changes). Like this:So
button-card
can't set the entity id in a custom field, but it does set entity id at a root level.Describe the solution you'd like
Add a global
entity
field at card's root level (as most cards have) that is passed down to each button if no other entity is provided.This:
would work just as this other example:
Describe alternatives you've considered
I haven't found any way of dinamically set the entity id inside
base_config
field.Other solutions like
lovelace-gen
are too heavy, I think.Additional context
No response
The text was updated successfully, but these errors were encountered: