diff --git a/src/panels/lovelace/cards/hui-entity-button-card.ts b/src/panels/lovelace/cards/hui-entity-button-card.ts
index 5f3926b4fd..92b2177c39 100644
--- a/src/panels/lovelace/cards/hui-entity-button-card.ts
+++ b/src/panels/lovelace/cards/hui-entity-button-card.ts
@@ -131,6 +131,9 @@ class HuiEntityButtonCard extends LitElement implements LovelaceCard {
style="${styleMap({
filter: this._computeBrightness(stateObj),
color: this._computeColor(stateObj),
+ height: this._config.icon_height
+ ? this._config.icon_height
+ : "auto",
})}"
>
`
diff --git a/src/panels/lovelace/editor/config-elements/config-elements-style.ts b/src/panels/lovelace/editor/config-elements/config-elements-style.ts
index 126f2aef0a..f153988b27 100644
--- a/src/panels/lovelace/editor/config-elements/config-elements-style.ts
+++ b/src/panels/lovelace/editor/config-elements/config-elements-style.ts
@@ -12,5 +12,8 @@ export const configElementStyle = html`
flex: 1;
padding-right: 4px;
}
+ .suffix {
+ margin: 0 8px;
+ }
`;
diff --git a/src/panels/lovelace/editor/config-elements/hui-entity-button-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-entity-button-card-editor.ts
index 7ac9ffca2a..6deeaa92ab 100644
--- a/src/panels/lovelace/editor/config-elements/hui-entity-button-card-editor.ts
+++ b/src/panels/lovelace/editor/config-elements/hui-entity-button-card-editor.ts
@@ -31,6 +31,7 @@ const cardConfigStruct = struct({
show_name: "boolean?",
icon: "string?",
show_icon: "boolean?",
+ icon_height: "string?",
tap_action: struct.optional(actionConfigStruct),
hold_action: struct.optional(actionConfigStruct),
theme: "string?",
@@ -68,6 +69,12 @@ export class HuiEntityButtonCardEditor extends LitElement
return this._config!.show_icon || true;
}
+ get _icon_height(): string {
+ return this._config!.icon_height && this._config!.icon_height.includes("px")
+ ? String(parseFloat(this._config!.icon_height))
+ : "";
+ }
+
get _tap_action(): ActionConfig {
return this._config!.tap_action || { action: "more-info" };
}
@@ -125,12 +132,24 @@ export class HuiEntityButtonCardEditor extends LitElement
>Show Icon?
-