Skip to content

Add label_icon_color support for label icons#302

Open
aw1604 wants to merge 3 commits intoalexpfau:mainfrom
aw1604:feature/label-icon-color
Open

Add label_icon_color support for label icons#302
aw1604 wants to merge 3 commits intoalexpfau:mainfrom
aw1604:feature/label-icon-color

Conversation

@aw1604
Copy link

@aw1604 aw1604 commented Nov 25, 2025

Add label_icon_color option to style label icons individually

This PR adds support for an additional per-entity configuration option:

label_icon_color: "#rrggbb"

This allows users to set the color of label icons (e.g. mdi: icons) independently from the event text color.
Currently, the label always inherits the default text color, which prevents proper color-coding of different event types.

✔️Key changes:

  • Added new config property: label_icon_color
  • Updated types.ts and config.ts to include the new option
  • Updated renderLabel() to accept and apply inline color styling
  • Updated event rendering so the matched entity config passes label_icon_color correctly
  • No breaking changes

Example usage:

entities:

  • entity: calendar.abfallkalender
    allowlist: Biotonne
    label: mdi:flower-outline
    label_icon_color: "#966919"

✔️ Backward compatibility

Fully backward compatible, if label_icon_color is omitted, the default behavior is unchanged.

✔️ Testing

Verified in Home Assistant 2025.11.3 with the latest Calendar Card Pro.

Tested with MDI icons

Works with allowlist/blocklist matching and entity overrides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant