This is a margin.

Removing margin:
type: horizontal-stack
cards:
- type: glance
title: Margin
entities:
- entity: sun.sun
- entity: sun.sun
- type: glance
title: No margin
style:
.entities .entity:
$: |
state-badge {
margin-top: 0px;
margin-bottom: 0px;
}
entities:
- entity: sun.sun
- entity: sun.sun