Hi all,
How can I align the chip card in the grid?
type: custom:layout-card
layout_type: grid
cards:
- type: custom:mushroom-template-card
primary: >
{{ states('sensor.temperatura_esterna_meteonetwork')| replace (".",",")}}
°C
secondary: '{{ states(''sensor.umidita_esterna_meteonetwork'')}} %'
icon: ''
picture: |
{% set mapper =
{ 'clear night': 'day',
'cloudy': 'cloudy',
'fog': 'cloudy',
'hail': 'rainy-7',
'lightning': 'thunder',
'lightning rainy': 'thunder',
'mostly cloudy': 'cloudy',
'partly cloudy': 'cloudy',
'partlycloudy': 'cloudy-day-3',
'pouring': 'rainy-6',
'rainy': 'rainy-5',
'snowy': 'snowy-6',
'snowy rainy': 'rainy-7',
'sunny': 'day',
'windy': 'cloudy',
'windy variant': 'cloudy-day-3'} %}
{% set state =
states('weather.forecast_meteonetwork').lower().replace('-',' ') %}
{{ '/local/meteo/animated/{}.svg'.format(mapper[state]) }}
layout: vertical
icon_color: ''
card_mod:
style: |
ha-card {
background: none;
--ha-card-box-shadow: 0px;
--card-primary-font-size: 10px;
--card-secondary-font-size: 10px;
--icon-size: 30px; }
- type: custom:mushroom-template-card
primary: |
{{ states('sensor.temperatura_interna')| replace (".",",")}} °C
secondary: ''
icon: mdi:home
picture: ''
layout: vertical
icon_color: white
card_mod:
style: |
ha-card {
background: none;
--ha-card-box-shadow: 0px;
--card-primary-font-size: 10px;
--card-secondary-font-size: 10px;
--icon-size: 30px; }
- type: custom:mushroom-template-card
primary: |-
{% if states('sensor.qualita_aria') | int(default=0) <= 50 %}
Buona
{% elif states('sensor.qualita_aria') | int(default=0) <= 100 %}
Moderata
{% elif states('sensor.qualita_aria') | int(default=0) <= 150 %}
Scadente
{% elif states('sensor.qualita_aria') | int(default=0) <= 200 %}
Insalubre
{% elif states('sensor.qualita_aria') | int(default=0) <= 300 %}
Inquinata
{% elif states('sensor.waqi_arenula_roma_lazio_italy') | int(default=0) >=
300 %}
PERICOLOSA
{% endif %}
secondary: |
{{states('sensor.qualita_aria')}} AQI
icon: mdi:tailwind
picture: ''
layout: vertical
icon_color: |-
{% if states('sensor.qualita_aria') | int(default=0) <= 50 %}
green
{% elif states('sensor.qualita_aria') | int(default=0) <= 100 %}
yellow
{% elif states('sensor.qualita_aria') | int(default=0) <= 150 %}
orange
{% elif states('sensor.qualita_aria') | int(default=0) <= 200 %}
red
{% elif states('sensor.qualita_aria') | int(default=0) <= 300 %}
#660099
{% elif states('sensor.waqi_arenula_roma_lazio_italy') | int(default=0) >= 300 %}
#7e0023
{% endif %}
card_mod:
style: |
ha-card {
background: none;
--ha-card-box-shadow: 0px;
--card-primary-font-size: 10px;
--card-secondary-font-size: 10px;
--icon-size: 30px; }
- type: custom:mushroom-template-card
primary: ' {{ states(''sensor.assorbimento_elettrico_casa_watt'')}} W '
secondary: '{{states(''sensor.costo_energia_giornaliero'')}} €'
icon: mdi:flash
picture: ''
layout: vertical
icon_color: |2-
{% if states('sensor.assorbimento_elettrico_casa_watt') | float >= 3000 %}
red
{% elif states('sensor.assorbimento_elettrico_casa_watt') | float >= 2000
%}
orange
{% elif states('sensor.assorbimento_elettrico_casa_watt') | float >= 500
%}
yellow
{% elif states('sensor.assorbimento_elettrico_casa_watt') | float < 500 %}
green
{% endif %}
card_mod:
style: |
ha-card {
background: none;
--ha-card-box-shadow: 0px;
--card-primary-font-size: 10px;
--card-secondary-font-size: 10px;
--icon-size: 30px; }
- type: horizontal-stack
cards:
- type: custom:mushroom-chips-card
style: |
ha-card {
--chip-background: none;
--chip-box-shadow: 0px 0px 10px yellow;
--chip-icon-size: 0.5em;
--chip-height: 50px;
--chip-border-radius: 100px;
}
chips:
- type: template
entity: switch.prese_casa
icon: |-
{% if is_state('switch.prese_casa', 'on')%}
mdi:power-socket-de
{% else %}
mdi:power-socket-de
{% endif %}
icon_color: |-
{% if is_state('switch.prese_casa', 'on')%}
yellow
{% else %}
white
{% endif %}
content: ''
alignment: center
layout:
grid-template-columns: 20% 20% 20% 20% 20%
grid-template-rows: auto
grid-template-areas: |
"main main2 main3 main4 main5"