Skip to content

Card Styling

The Dreame Vacuum Card natively complies with Home Assistant's default theme. All internal components, menus and layouts automatically adapt to the active Home Assistant theme. It seamlessly inherits both Light and Dark mode colors dynamically, making custom styling unnecessary under standard conditions.

Home Assistant LightHome Assistant Light
Home Assistant LightHome Assistant Light

Creating a custom Home Assistant theme to customize the aesthetic involves overriding the external CSS properties listed below.

Map Styling

These settings affect only the UI components of the card. Customizing the internal colors of the vacuum map itself, such as rooms, paths and walls, is handled in the Override Colors section.

The card also uses internal settings prefixed with --dvc-. Overriding internal settings directly is not recommended, as their behavior changes in future updates. Target the external Home Assistant theme settings listed below instead.

card-mod

The card-mod plugin is explicitly disabled and not supported on this card to ensure stability. Custom Home Assistant themes must be used to override the CSS properties provided on this page.

If a specific visual change cannot be achieved through themes, a feature request explaining the desired changes and the reasoning behind them can be submitted via the Issue Reporting page.

Backgrounds & Borders

These settings control the main structural appearance of the card.

VariableDescription
--ha-card-backgroundDefines the main background color of the card.
--secondary-background-colorUsed for secondary surfaces, overlay backgrounds and floating menus.
--view-backgroundThe dashboard's base background color. The card uses this when in panel or picture mode to blend seamlessly.
--ha-card-border-radiusDefines the roundness of the card's outer corners.
--ha-card-border-widthWidth of the card's border line.
--ha-card-border-colorColor of the card border.
--divider-colorColor of internal list dividers and separators.
--ha-card-box-shadowThe box-shadow applied to the main card container.
--ha-card-backdrop-filterAllows adding backdrop filters, such as blur, to the card background.

Text & Typography

These settings dictate the text colors used throughout the user interface.

VariableDescription
--primary-text-colorThe main text color used for primary headings, state text and values.
--secondary-text-colorUsed for secondary text, detailed statuses and inactive tab labels.
--disabled-text-colorColor used for text that is currently unavailable or disabled.
--text-primary-colorThe color of text sitting directly on top of primary-colored buttons.

Icons & Accents

These settings manage the coloring of interactive elements, active states and icons.

VariableDescription
--primary-colorThe primary accent color for active elements, buttons, loader animations and selected tabs.
--light-primary-colorA lighter version of the primary color, used for hover states or active button backgrounds.
--accent-colorAlternative accent color used for specific highlights in the UI.
--mdc-theme-on-primaryColor of text or icons placed on top of a primary colored background.
--paper-item-icon-colorThe default color for state and menu icons.
--paper-item-icon-active-colorThe color applied to icons when their corresponding state is active.

Status & Semantic Colors

The card dynamically changes color based on the vacuum's state and active notifications.

VariableDescription
--success-colorUsed for successful operations or positive states, such as being fully charged.
--info-colorUsed for informational elements and standard alerts.
--warning-colorUsed for warning alerts, low battery states, or minor issues.
--error-colorUsed for critical faults, errors and impassable map objects.
--state-unavailable-colorThe color indicating the vacuum is currently unavailable or offline.

Interactive Elements

Theme settings specifically targeting UI components like buttons, scrollbars and inputs.

VariableDescription
--mdc-theme-surfaceThe surface color for floating menus, dropdowns and popup cards.
--mdc-button-raised-box-shadowThe shadow applied to raised buttons to give them depth.
--input-hover-line-colorColor of the underline when hovering over specific input fields.
--input-dropdown-icon-colorColor of the caret/arrow icons inside dropdown menus.
--scrollbar-thumb-colorColor used for the thumb of the remote control joystick and scrollbars.
--rgb-primary-colorRGB comma-separated version of the primary color, used to apply alpha transparency.
--rgb-primary-text-colorRGB comma-separated version of the primary text color, used to apply alpha transparency.