Hello there, hope someone could help me.
I can’t figure out to stretch my mini-graph-card inside a button-card. There is a space between bottom of the card and the graph.
The only thing which is working is increasing the height of the row with grid-template-rows, but the aspect_ratio 1/1 isn’t kept.
Here’s my code :
- type: custom:button-card
aspect_ratio: 1/1
icon: mdi:chair-rolling
entity: sensor.ble_temperature_thermometre1
name: Bureau
custom_fields:
graph:
card:
type: custom:mini-graph-card
entities:
- sensor.ble_temperature_thermometre1
show:
icon: false
name: false
state: false
line_width: 5
hu: |
[[[
return `<ha-icon
icon="mdi:water-percent:"
style="width:20px;color: skyblue;">
</ha-icon><span style="color: var(--text-color-sensor);">${states['sensor.ble_humidity_thermometre1'].state}%</span>`
]]]
temp: |
[[[
return `<ha-icon
icon="mdi:thermometer:"
style="width:20px;color:var(--accent-color);">
</ha-icon><span>${entity.state}°C</span>`
]]]
styles:
custom_fields:
graph:
- overflow: unset
card:
- overflow: unset
grid:
- grid-template-areas: '"n i" "temp hu" "graph graph"'
- grid-template-columns: 50% 50%
- grid-template-rows: 1fr 1fr 1fr
- overflow: unset
name:
- font-size: 16px
- color: white
state:
- font-size: 10px
- color: white
And with setting
styles:
grid:
- grid-template-rows: 30% 30% 100%
The card is higher than others in my horizontal stack…
Many thanks for your help