button-card: Styles Card Height 100% not working
Checklist
- I updated the card to the latest version available
- [o] I cleared the cache of my browser —> IOS companion app
Describe the bug Since update to HA 2024.7.4 the card height property 100% isn’t working anymore inside a grid.
Version of the card Version: v4.1.2
To Reproduce This is the configuration I used:
type: grid
square: true
columns: 3
cards:
…
- type: custom-button
show_name: true
show_icon: true
entity: binary_sensor.xxx
name: Status
show_state: false
styles:
card:
- height: 100%
state:
- value: 'on'
icon: mdi:check-circle
styles:
icon:
- color: green
- value: 'off'
icon: mdi:cancel
styles:
icon:
- color: red
Screenshots
Expected behavior
Smartphone (please complete the following information):
- Device: iPhone13 mini
- OS: 17.5.1
- Browser: HA companion app
- Version: 2024.730
Additional context
- also in safari on IOS
- I always update HA in docker the first day of the month, to the highest minor version of the month before.
- Maybe the structure of the grid card in HA changed ?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 15 (2 by maintainers)
well… I did, and got inspired by this:https://github.com/ngocjohn/hass-config/blob/c219b7081ef10313d1b14cea47daea336bd81045/config/dashboards/templates/button_card_templates/tpl_chips.yaml#L58C22-L58C69
can I reach out to you somewhere to have side chat? maybe in my community topic on using media aspects for an animation here?
Thanks if you could have a look
Post your config code here, I’ll try to help you if I can.
In my case, my button card is in a
horizontal-stackand I am not able to get it to fill the available space. I don’t want to hard code an aspect ratio, I just want the card to do what the default cards do. Height 100% does nothing.aspect_ratio: 1/1