Open budofighter opened 5 months ago
I have the same issue, and was just coming to post it:
I've installed Button-Card to use for my custom UI. All works well, but something is driving me nuts - all the buttons in a Button-card are rectangular, and I can't figure out why.
I have re-installed HA in a new VM, and only have button-card as my only HACS plugin (IE: it's CLEAN)
I create a new dashboard. I make it a Panel. I add a card: Button-card.
The card consists of just this:
type: custom:button-card
show-state: false
tap_action:
action: null
custom_fields:
weather_forecast:
card:
type: button
entity: sensor.sun_next_noon
styles:
card:
- padding: 10px
- border-radius: 100px
- align-self: start
- width: 1112px
- height: 814px
- opacity: 1
- background-color: green
custom_fields:
weather_forecast:
- position: absolute
- top: 50px
- left: 50px
- width: 400px
- height: 200px
The result in the preview is a button with rounded corners. In the panel itself, it's rectangular. 🤔
I've tried adding styling with radius, but nothing seems to help. Am I missing something, or is this a bug?
That's related to a change in HA Core: https://github.com/home-assistant/frontend/pull/20122 when in panel mode.
A possible fix is using card-mod, see this comment: https://github.com/thomasloven/lovelace-layout-card/issues/284#issuecomment-2048424148
Checklist
Describe the bug A clear and concise description of what the bug is.
Version of the card Version: 4.1.2
To Reproduce This is the configuration I used:
Screenshots HA-Core version 2024.3.3:
HA-Core version 2024.3.x
Expected behavior After Update, the shape and color should be the same, as before the update.
Desktop (please complete the following information):
Version [123.0.2420.97]
Version [123.0.6312.123]
Smartphone (please complete the following information):
Additional context The problem occurred after updating HA Core on 2024.4.0. Also in Version 2024.4.1-3 is the same problem. If I change the site layout from panel (1 card) to grid view (standard), the problem is solved. If I go back to panel view, the problem appears again. Removing additional style information, come to the same result:
Edit: If you use styles with 10% boarder-radius, it's a workaround for the same effect: