grid-layout not work with multple auto-entities
ceinmart opened this issue · comments
My Home Assistant version: 2023.12.1
Layout-card version (FROM BROWSER CONSOLE): 2.4.4
What I am doing: trying to convert a vertical-stack, which have 3 auto-entities columns to a grid-layout to auto adjust they layout.
What I expected to happen: just works...
What happened instead: nothing appear , stay into a blank card...
Minimal steps to reproduce:
type: custom:grid-layout
title: Custos
layout:
grid-template-columns: auto
grid-template-areas: |
"lin1 lin1 lin1"
mediaquery:
'(max-width: 800px)':
grid-template-columns: 50% 50%
grid-template-areas: |
"lin1 lin1"
"lin1 lin1"
"lin1 lin1"
"lin1 lin1"
cards:
- type: custom:auto-entities
title: Diario
filter:
template: |-
{% for state in states.sensor -%}
{%- if (state.entity_id | regex_match("^sensor.energia_consumo", ignorecase=true))
and (state.name | regex_match(".*custo.*", ignorecase=true))
and (state.name | regex_match(".*diario.*", ignorecase=true))
-%}
{{
{
'entity': state.entity_id,
'name': state.attributes.friendly_name|regex_replace(find='(energia consumo *|diario)', replace='', ignorecase=True)|capitalize
}
}},
{%- endif -%}
{%- endfor %}
show_empty: true
card:
type: custom:bar-card
view_layout:
grid-area: lin1
- type: custom:auto-entities
title: Semanal
filter:
template: |-
{% for state in states.sensor -%}
{%- if (state.entity_id | regex_match("^sensor.energia_consumo", ignorecase=true))
and (state.name | regex_match(".*custo.*", ignorecase=true))
and (state.name | regex_match(".*semanal.*", ignorecase=true))
-%}
{{
{
'entity': state.entity_id,
'name': state.attributes.friendly_name|regex_replace(find='(energia consumo *|semanal)', replace='', ignorecase=True)|capitalize
}
}},
{%- endif -%}
{%- endfor %}
show_empty: true
card:
type: custom:bar-card
view_layout:
grid-area: lin1
- type: custom:auto-entities
title: Mensal
filter:
template: |-
{% for state in states.sensor -%}
{%- if (state.entity_id | regex_match("^sensor.energia_consumo", ignorecase=true))
and (state.name | regex_match(".*custo.*", ignorecase=true))
and (state.name | regex_match(".*mensal.*", ignorecase=true))
-%}
{{
{
'entity': state.entity_id,
'name': state.attributes.friendly_name|regex_replace(find='(energia consumo *|mensal)', replace='', ignorecase=True)|capitalize
}
}},
{%- endif -%}
{%- endfor %}
show_empty: true
card:
type: custom:bar-card
view_layout:
grid-area: lin1
Error messages from the browser console:
There is no error on the web console, it just shows nothing...
If I refresh the page , out of card editor , at the dashboard, shows others plugins messages , apparently , nothing with layout-card or auto-entities...
By putting an X in the boxes ([X]) below, I indicate that I:
- Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- Have made sure I am using the latest version of the plugin.
- Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.