slider-button-card icon indicating copy to clipboard operation
slider-button-card copied to clipboard

Fix Home Assistant 2025.5 theming compatibility

Open alxDisplayr opened this issue 10 months ago • 0 comments

Description

This PR fixes the theming compatibility issue with Home Assistant 2025.5 reported in #246.

Problem

Home Assistant 2025.5 introduced breaking changes to theming and typography, specifically removing the deprecated --paper-item-icon-color CSS variable. This was causing icons in the slider-button-card to display with wrong colors (white icons, black action buttons) instead of theme-appropriate colors.

Solution

Replaced all instances of the deprecated --paper-item-icon-color variable with the new --state-icon-color variable as specified in the Home Assistant 2025.5 breaking changes documentation.

Changes Made

  • ✅ Updated src/slider-button-card.ts to use --state-icon-color instead of --paper-item-icon-color
  • ✅ Rebuilt the distribution file dist/slider-button-card.js with the updated changes
  • ✅ Maintained backward compatibility with fallback values
  • ✅ Updated both active styles and commented fallback styles for consistency

Testing

  • ✅ Project builds successfully without errors
  • ✅ All instances of deprecated variable have been replaced
  • ✅ Distribution file has been updated with the changes

Fixes

Fixes #246

Compatibility

This change ensures compatibility with:

  • ✅ Home Assistant 2025.5 and later
  • ✅ Earlier Home Assistant versions (through fallback values)

Note: This is a critical fix for users running Home Assistant 2025.5+ who are experiencing icon theming issues.


Pull Request opened by Augment Code with guidance from the PR author

alxDisplayr avatar Jun 22 '25 07:06 alxDisplayr