diff --git a/src/purifier-card.ts b/src/purifier-card.ts index 4f915d2d..fed287f7 100644 --- a/src/purifier-card.ts +++ b/src/purifier-card.ts @@ -361,8 +361,12 @@ export class PurifierCard extends LitElement { const isActive = service || - percentage === attributes.percentage || - preset_mode === attributes.preset_mode; + (percentage === attributes.percentage && + attributes.preset_mode == null) || + (preset_mode === attributes.preset_mode && + attributes.percentage == null) || + (preset_mode === attributes.preset_mode && + percentage === attributes.percentage); const className = isActive ? 'active' : '';