dawiddutoit/custom-claude/ha-dashboard-cards
Claude Code and agent skill by dawiddutoit/custom-claude
- community
Checking that the SKILL.md file is still in the repository.
Creates Home Assistant dashboard cards programmatically using ha_card_utils.py utilities for static titles (fixes dynamic hover), color gradients (threshold-based), section separators (bubble-card), and info cards (markdown). Use when asked to "fix mini-graph title changing", "add color gradient to graph", "create dashboard section", "static title card_mod", or "organize dashboard with separators".
Install
npx vskill@latest install dawiddutoit/custom-claude/ha-dashboard-cardsSKILL.md
Works with Python dashboard builders, ha_card_utils.py module, and Lovelace YAML dashboards.
Home Assistant Dashboard Cards
Quick Start
Create a mini-graph-card with multiple entities that keeps its title static:
Table of Contents
- When to Use This Skill
- What This Skill Does
- The Static Title Problem
- Core Utilities
4.1. Static Title Fix 4.2. Color Gradients 4.3. Section Separators 4.4. Info Cards
- Common Patterns
5.1. Three-Graph Layout (1hr, 24hr, 1wk) 5.2. Section Structure with Separators 5.3. Sensor Sections with History
- Color Scheme Presets
- Supporting Files
- Expected Outcomes
- Requirements
- Red Flags to Avoid
When to Use This Skill
Explicit Triggers
- "Create HA dashboard cards"
- "Add mini-graph-card with static title"
- "Add color gradient to graph"
- "Create dashboard section with separator"
- "Fix mini-graph title changing on hover"
Implicit Triggers
- Building Home Assistant dashboards programmatically
- Working with
custom:mini-graph-cardand multiple entities - Creating sensor history graphs with time ranges
- Organizing dashboard sections visually
- Adding context/explanation cards to dashboards
Problem Detection
- User reports mini-graph-card titles changing dynamically
- Dashboard needs visual thresholds (color-coded values)
- Need consistent section organization across dashboards
- Multiple graphs showing same data at different time ranges
What This Skill Does
This skill provides reusable utilities for creating Home Assistant Lovelace dashboard cards with:
- Static Titles - Prevents mini-graph-card from changing titles on hover
- Color Gradients - Adds threshold-based color coding to graphs
- Section Separators - Creates visual section headers with icons
- Info Cards - Adds informational cards with colored borders
- Common Patterns - Implements standard layouts (3-graph rows, sensor sections)
All utilities are available in ha_card_utils.py and work with both Python dashboard builders and YAML configurations.
Usage
- Import utilities:
from ha_card_utils import add_static_title_to_mini_graph, add_color_gradient_to_mini_graph, create_bubble_separator, COLOR_SCHEMES - Choose utility: Static title (hover fix), color gradient (thresholds), separator (sections), info card (context)
- Apply to card: Pass card dict to utility function, it modifies in place
- Save dashboard: Use WebSocket API or manual YAML to save configuration
- Verify: Check dashboard, test hover behavior, validate colors display correctly
See Core Utilities section for detailed function usage.
The Static Title Problem
The Problem
When custom:mini-graph-card displays multiple entities, hovering over different sensor lines causes the card title to dynamically change to the entity name.
Example:
- Card title: "Last 24 Hours"
- Entities: Office (green), Bedroom (blue)
- Hover over Office line → title changes to "Office"
- Hover over Bedroom line → title changes to "Bedroom"
This is confusing because the title should indicate the time range, not which sensor is hovered.
The Solution
Use card_mod with CSS to overlay static text using a ::after pseudo-element and hide the dynamic title.
CSS Pattern:
How It Works:
- Keep header container visible
- Inject static text via
::afterpseudo-element - Hide dynamic child elements with
display: none
Technical Deep Dive
See references/static_title_technique.md for complete CSS explanation, DOM structure analysis, and alternative approaches.
Core Utilities
4.1. Static Title Fix
Function: add_static_title_to_mini_graph(card: dict) -> dict
Forces mini-graph-card titles to remain static regardless of hover state.
Usage:
When to Use:
- Any mini-graph-card with multiple entities
- Time-range graphs (Last Hour, Last 24 Hours, Last Week)
- Comparison graphs showing multiple sensors
4.2. Color Gradients
Function: add_color_gradient_to_mini_graph(card: dict, thresholds: list[dict]) -> dict
Adds threshold-based color gradients to graphs for visual feedback.
Usage:
When to Use:
- Temperature graphs (cold/comfortable/hot zones)
- Air quality sensors (good/moderate/poor ranges)
- Battery levels (full/medium/low/critical)
- Any sensor with meaningful value thresholds
Note: This removes fixed entity colors so the gradient can take effect.
4.3. Section Separators
Function: create_bubble_separator(name: str, icon: str, enhanced: bool = False) -> dict
Creates bubble-card separators for organizing dashboard sections.
Usage:
Enhanced Features:
- Gradient background with spacing
- Larger font and bold text
- Thicker separator line
When to Use:
- Major section headers (enhanced=True)
- Sub-section labels (enhanced=False)
- Organizing related cards into groups
4.4. Info Cards
Function: create_info_card(content: str, border_color: str, background_color: str | None = None) -> dict
Creates markdown cards with colored borders for explanations and context.
Usage:
When to Use:
- Explaining sensor readings
- Providing context for air quality/gas sensors
- Warning messages or alerts
- Instructions for manual controls
Color Suggestions:
#e74c3c(Red) - Warnings, critical info#f1c40f(Yellow) - Cautions, tips#3498db(Blue) - Informational notes#2ecc71(Green) - Success, good status
Common Patterns
5.1. Three-Graph Layout (1hr, 24hr, 1wk)
Display the same sensor data at three time ranges in a horizontal row:
When to Use:
- Comparing short-term vs long-term trends
- Temperature, humidity, air quality history
- Any sensor where time-range comparison is valuable
5.2. Section Structure with Separators
Organize dashboard sections with enhanced separators and sub-sections:
Structure Pattern:
- Enhanced separator (major section)
- Sub-section separator (current readings)
- Sensor cards (Mushroom template cards showing current values)
- Sub-section separator (history)
- Three-graph row (time-range comparison)
5.3. Sensor Sections with History
Complete sensor section combining current values, context, and history. See examples/complete-sections.md for full implementation.
Pattern:
- Enhanced separator (section header)
- Sub-section separator (current readings)
- Sensor cards (Mushroom template cards)
- Sub-section separator (history)
- Three-graph row with color gradients and static titles
Color Scheme Presets
The COLOR_SCHEMES dict provides preset thresholds for common sensor types.
Temperature: Cold (10°C, blue) → Comfortable (18°C, green) → Warm (26°C, yellow) → Hot (32°C, red)
Humidity: Dry (0%, red) → Low (30%, green) → Comfortable (60%, yellow) → High (80%, red)
Air Quality: Poor (low kΩ, red) → Moderate (orange) → Good (green) → Excellent (high kΩ, blue)
See references/color_gradients.md for complete color palette and threshold recommendations.
Supporting Files
- references/static_title_technique.md - Complete technical reference for card_mod CSS technique, DOM structure analysis, and alternative approaches
- references/color_gradients.md - Color threshold guide with visual examples and color palette recommendations
- examples/complete-sections.md - Full examples of temperature, humidity, and air quality sections with complete implementations
Expected Outcomes
Successful Card Creation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ha-dashboard-cards/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 4 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dawiddutoit/custom-claude/ha-dashboard-cards)