edlentz
(Ed Lentz)
May 13, 2025, 9:58pm
1
I updated my system today and the spacing imy my dashboard changed. It is a simple dashboard showing only about a dozen entities. Herre is a pic of how it looks now
Here is the Yaml for one side
type: grid
cards:
- type: markdown
content: |
Temp. {{ states('sensor.temperature') }} F
card_mod:
style: |
ha-card {
text-align: center;
padding: 0px; /* Adds padding inside the card */
width: 400px; /* Adjusts the card width */
height: 200px; /* Sets a fixed height (adjust as needed) */
display: flex;
justify-content: left;
align-items: center;
background: transparent; /* Makes the background transparent */
border: none; /* Removes the border */
box-shadow: none; /* Removes any shadow */
}
ha-markdown {
font-size: 3em; /* Adjust font size as needed */
color: white;
}
grid_options:
columns: full
- type: markdown
content: |
Feels like {{ states('sensor.feels_like_temperature') | float |
round(0) }}
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px; /* Adds padding inside the card */
width: 500px; /* Adjusts the card width */
height: 200px; /* Sets a fixed height (adjust as needed) */
display: flex;
justify-content: left;
align-items: center;
background: transparent; /* Makes the background transparent */
border: none; /* Removes the border */
box-shadow: none; /* Removes any shadow */
}
ha-markdown {
font-size: 3em; /* Adjust font size as needed */
color: white;
}
grid_options:
columns: full
- type: markdown
content: |
Pressure {{ states('sensor.pressure') }}
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px; /* Adds padding inside the card */
width: 500px; /* Adjusts the card width */
height: 200px; /* Sets a fixed height (adjust as needed) */
display: flex;
justify-content: left;
align-items: center;
background: transparent; /* Makes the background transparent */
border: none; /* Removes the border */
box-shadow: none; /* Removes any shadow */
}
ha-markdown {
font-size: 3em; /* Adjust font size as needed */
color: white;
}
grid_options:
columns: full
- type: markdown
content: |
Humidity {{ states('sensor.humidity') }} %
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px; /* Adds padding inside the card */
width: 400px; /* Adjusts the card width */
height: 200px; /* Sets a fixed height (adjust as needed) */
display: flex;
justify-content: left;
align-items: center;
background: transparent; /* Makes the background transparent */
border: none; /* Removes the border */
box-shadow: none; /* Removes any shadow */
}
ha-markdown {
font-size: 3em; /* Adjust font size as needed */
color: white;
}
grid_options:
columns: ful
- type: vertical-stack
cards:
- type: conditional
conditions:
- condition: state
entity: binary_sensor.esphome_web_9b7da8_honda_door_contact
state: "on"
card:
type: markdown
content: |
**Honda Door**
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px;
width: 500px;
height: 200px;
display: flex;
justify-content: left;
align-items: center;
background: transparent;
border: none;
box-shadow: none;
}
ha-markdown {
font-size: 3em;
color: orange;
}
- type: conditional
conditions:
- entity: binary_sensor.esphome_web_9b7da8_other_door_contact
state: "on"
card:
type: markdown
content: |
**Other Door**
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px;
width: 400px;
height: 200px;
display: flex;
justify-content: left;
align-items: center;
background: transparent;
border: none;
box-shadow: none;
}
ha-markdown {
font-size: 3em;
color: orange;
}
- type: conditional
conditions:
- entity: binary_sensor.cat_window_contact
state: "on"
card:
type: markdown
content: |
**Cat Window**
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px;
width: 600px;
height: 200px;
display: flex;
justify-content: left;
align-items: center;
background: transparent;
border: none;
box-shadow: none;
}
ha-markdown {
font-size: 3em;
color: orange;
}
- type: conditional
conditions:
- condition: state
entity: binary_sensor.esphome_web_9b7da8_garage_side_door
state: "on"
card:
type: markdown
content: |
**Garage Side Door**
card_mod:
style: |
ha-card {
text-align: center;
padding: 1px;
width: 500px;
height: 200px;
display: flex;
justify-content: left;
align-items: center;
background: transparent;
border: none;
box-shadow: none;
}
ha-markdown {
font-size: 3em;
color: orange;
}
I changed the font size from 4 to 3, changed the padding to 1. It still looks like it is double spaced. The entity “Cat Window” is a Vertical stack that has several entities that show up when the status is open. the whole dashboard is basically two sides, I have included the right side. What has changed in the core upgrade that would change this?
Thanks
Hello edlentz ,
See the first one in this list.
Celebrating 2 million users with quality of life improvements! Enjoy smarter backups with per-location retention, Z-Wave Long Range support, an improved entity picking experience, tons of new voice...
edlentz
(Ed Lentz)
May 14, 2025, 3:34pm
3
Thanks Sir_Goodenough
Sorry but I don’ t understand your reference. Is it the card-mod usage of the ha tokens? I don’t see any tokens that I am using in that list.
Thanks
I have the same issue. After updating to the 2025.5 update, the spacing around my fonts has gotten larger and made my dashboard (which was fitted to a tablet) too tall. It’s just using basic grids, buttons, sensors; nothing custom. I couldn’t get everything to fit without reducing the size of the icons, to way too small, so I had to restore from backup.
I figured this would be a bigger problem for more people and it might get fixed, but I just tried updating to 2025.5.3, and the issue remains. I understand that there was a major revamp to the theming and typography, but I feel like this is a regression to the core components. I can no longer fit as many things on the same screen I used to.
Is there a way I can fix it myself?
How it looks in 2025.4
How it looks in 2025.5
type: sections
max_columns: 4
icon: mdi:home-thermometer
path: DHTs
title: Home
sections:
- type: grid
cards:
- square: false
type: grid
cards:
- graph: line
type: sensor
detail: 1
entity: sensor.dht3_outside_temperature
name: Outside
- graph: line
type: sensor
detail: 1
entity: sensor.dhtir1_house_temperature
name: House
- graph: line
type: sensor
detail: 2
entity: sensor.dht1_temperature
name: Dryer
hours_to_show: 2
- graph: line
type: sensor
detail: 1
entity: sensor.dhtir2_granny_flat_temperature
name: Mum
- graph: line
type: sensor
detail: 1
name: Reefer
entity: sensor.dht2_temperature
- square: false
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.verandah_house_front
name: Front
show_state: false
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.verandah_house_back
name: Back
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.verandah_mum
name: Mum
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: light.verandah_ramp_door
name: Ramp
columns: 2
grid_options:
columns: 24
rows: auto
columns: 6
- square: true
type: grid
cards:
- graph: line
type: sensor
detail: 1
entity: sensor.dht3_outside_humidity
name: Outside
- graph: line
type: sensor
detail: 1
entity: sensor.dhtir1_house_humidity
name: Home
- graph: line
type: sensor
detail: 2
entity: sensor.dht1_humidity
name: Dryer
hours_to_show: 2
- graph: line
type: sensor
detail: 1
entity: sensor.dhtir2_granny_flat_humidity
name: Mum
- graph: line
type: sensor
detail: 1
entity: sensor.dht2_humidity
name: Reefer
- square: true
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.hot_water_315l
name: 315L
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.hot_water_315l_heating
name: Heat
visibility:
- condition: or
conditions:
- condition: state
entity: input_boolean.hot_water_315l_fully_heated
state: "off"
- condition: state
entity: binary_sensor.hot_water_315l_heating
state: "on"
- show_name: true
show_icon: true
type: button
name: Full
entity: input_boolean.hot_water_315l_fully_heated
visibility:
- condition: and
conditions:
- condition: state
entity: input_boolean.hot_water_315l_fully_heated
state: "on"
- condition: state
entity: binary_sensor.hot_water_315l_heating
state: "off"
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: switch.hot_water_granny_flat
name: GF
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.hot_water_gf_heating
name: Heat
visibility:
- condition: or
conditions:
- condition: state
entity: input_boolean.hot_water_gf_fully_heated
state: "off"
- condition: state
entity: binary_sensor.hot_water_gf_heating
state: "on"
- show_name: true
show_icon: true
type: button
entity: input_boolean.hot_water_gf_fully_heated
name: Full
visibility:
- condition: and
conditions:
- condition: state
entity: input_boolean.hot_water_gf_fully_heated
state: "on"
- condition: state
entity: binary_sensor.hot_water_gf_heating
state: "off"
columns: 2
columns: 6
grid_options:
columns: 24
rows: auto
column_span: 4
- type: grid
cards:
- square: false
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: none
entity: binary_sensor.mother_awake
show_state: false
- show_name: true
show_icon: true
type: button
show_state: false
icon: ""
name: Empty RoboVac
grid_options:
columns: 12
rows: 2
entity: binary_sensor.robovac_needs_emptying
icon_height: 50px
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.russell_pc_on
name: Russell PC
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.washing_machine_running
name: Washer
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.dryer_running
show_state: false
name: Dryer
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.kitchen_fridge
icon: mdi:heat-pump
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.drinks_fridge
icon: mdi:heat-pump
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: binary_sensor.tank_pump
- show_name: true
show_icon: true
type: button
entity: binary_sensor.spa
grid_options:
columns: 24
rows: auto
columns: 9
- square: false
type: grid
cards:
- type: entity
name: House
entity: sensor.energy_monitoring_house_gpos_and_lights_power
- type: entity
entity: sensor.energy_monitoring_granny_flat_power
name: GF Sub
- type: entity
entity: sensor.reefer_sub_power
name: Reefer
- type: entity
entity: sensor.other_power
name: Other
- type: entity
entity: sensor.other_power
name: Other
grid_options:
columns: 24
rows: auto
columns: 5
column_span: 4
cards: []
badges: []
Daviol
(Daviol)
May 29, 2025, 3:26am
6
I am facing the same issue.
While I am using card mod in some areas, I have basic Button Cards impacted by this. Any advice?
Daviol
(Daviol)
May 29, 2025, 3:32am
7
Found a couple of relevant issues worth watching:
opened 12:09PM - 22 May 25 UTC
### Checklist
- [x] I have updated to the latest available Home Assistant versi… on.
- [x] I have cleared the cache of my browser.
- [x] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
Since the Home Assistant 2025.5 update, the navigation bar tab paddings have increased significantly. On mobile devices with limited screen width, this increased padding causes a horizontal scrollbar to appear even when only a few (e.g., five) navigation icons are present. This not only requires unnecessary scrolling but also reduces the overall overview, as users need to scroll horizontally to see all the navigation options.
I already found a workaround by modifying a Home Assistant CSS variable (--sl-spacing-large) with card mod but unfortunately this solution creates a new problem. As it turns out on every reload of the dashboard, a scroll button for the navigation bar ">" appears, even if there is nothing to scroll, like shown in the video. Even though I modified the padding with card mod, this should not happen.
https://github.com/user-attachments/assets/0bc52239-6951-4f1d-9e7c-885b69d41a93
### Describe the behavior you expected
With a reasonable number of navigation icons (e.g., five), all icons should be visible without requiring horizontal scrolling on typical mobile screen widths, maximizing the immediate overview of available sections.
Regarding the problem shown with the modified spacing, there shouldn't be the this initial horizontal scroll button, as it don't serve any function.
### Steps to reproduce the issue
1. Overwrite the CSS variable with `card mod` to value smaller than 1.25rem (e. g. 0.5rem)
```
card-mod-theme: "Theme"
card-mod-root: |
sl-tab {
--sl-spacing-large: 0.5rem !important;
}
```
2. Reload the applied theme
3. Resize your browser window to a width close to that of a mobile device where the default theme (without the card-mod modification) would exhibit a horizontal scrollbar with your current number of navigation icons
4. Reload the webpage
5. Observe that the navigation bar still displays the visual indicator for horizontal scrolling, even though the reduced padding might now allow all icons to be visually accommodated without actual scrolling.
### What version of Home Assistant Core has the issue?
2025.5
### What was the last working version of Home Assistant Core?
2025.4
### In which browser are you experiencing the issue?
_No response_
### Which operating system are you using to run this browser?
_No response_
### State of relevant entities
```txt
```
### Problem-relevant frontend configuration
```yaml
```
### Javascript errors shown in your browser console/inspector
```txt
```
### Additional information
The temporary appearance of the scroll button on reload, which then disappears upon resizing, suggests that the layout calculation might not be correctly accounting for the available width or the adjusted padding on initial load.
opened 09:43AM - 28 May 25 UTC
### Checklist
- [x] I have updated to the latest available Home Assistant versi… on.
- [x] I have cleared the cache of my browser.
- [x] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
On 2025.6.0b0 the Entity card is rendering with lots of extra spacing compared to before, I have these on a tablet dashboard and it fits less cards on screen now due to all this extra spacing.
Previous / Stable Release:

Beta Release (there's extra spacing between the name and entity value, and also below the entity value I think):
<img width="543" alt="Image" src="https://github.com/user-attachments/assets/2f8a0f46-26ac-4bf3-8a8d-2c1958eae488" />
### Describe the behavior you expected
Same style as 2025.5
### Steps to reproduce the issue
1. Add Entity card on 2025.6.0b0
### What version of Home Assistant Core has the issue?
2025.6.0b0
### What was the last working version of Home Assistant Core?
2025.5
### In which browser are you experiencing the issue?
_No response_
### Which operating system are you using to run this browser?
_No response_
### State of relevant entities
```txt
```
### Problem-relevant frontend configuration
```yaml
- type: grid
columns: 2
square: false
cards:
- type: entity
entity: sensor.upstairs_temperature
name: Upstairs Avg Temp
- type: entity
entity: sensor.upstairs_humidity
name: Upstairs Avg Humid
- type: entity
entity: sensor.downstairs_temperature
name: Downstairs Avg Temp
- type: entity
entity: sensor.downstairs_humidity
name: Downstairs Avg Humid
```
### Javascript errors shown in your browser console/inspector
```txt
```
### Additional information
_No response_
I haven’t been able to find exactly what happened, but I’ve been able to correct for it using a theme and card mod. If you’re using a custom theme, you can manually throw this into the yaml of the theme to get most of the way there
ha-line-height-normal: 1.3
If you’re using the default theme, you can create a new theme file (in config/themes/2025.4_spacing/2025.4_spacing.yaml) and paste this in
2025.4 Spacing:
ha-line-height-normal: 1.3
card-mod-theme: "2025.4 Spacing"
card-mod-card-yaml: |
.: |
ha-card {
padding: 0 !important;
}
Then set that are your global or view or card theme. It’s actually slightly shorter than original, but it solves my problem. Maybe it’ll help others out too
The shorter version is the new one. It actually looks better, because it originally sat right on the border.