Skip to content

Commit 0811028

Browse files
julienldclaude
andcommitted
feat(dashboard): require config_hash, remove card tools, add hints
BREAKING CHANGE: Remove ha_dashboard_add_card, ha_dashboard_update_card, ha_dashboard_remove_card tools. Use jq_transform in ha_config_set_dashboard instead for all card operations. Changes: - config_hash now REQUIRED for jq_transform (optimistic locking) - config_hash optional for full config replacement (validates if provided) - Add card_count and hint to get_dashboard for large dashboards (30+ cards) - Add soft warning when full-replacing large dashboards - Document multi-op jq syntax with pipe chaining - Add IMPORTANT warning about index shifting after delete/add ops - Add ENABLE_DASHBOARD_PARTIAL_TOOLS feature flag for find_card - Remove 726 lines of redundant card tool code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 65b4581 commit 0811028

2 files changed

Lines changed: 140 additions & 886 deletions

File tree

src/ha_mcp/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ class Settings(BaseSettings):
6969
# Examples: "tools_config_automations,tools_config_scripts,tools_traces"
7070
enabled_tool_modules: str = Field("all", alias="ENABLED_TOOL_MODULES")
7171

72+
# Dashboard partial update tools (jq_transform, find_card)
73+
# These are token-efficient alternatives to full config replacement.
74+
# Disable when using clients with programmatic tool use (future).
75+
enable_dashboard_partial_tools: bool = Field(True, alias="ENABLE_DASHBOARD_PARTIAL_TOOLS")
76+
7277
@property
7378
def env_file_name(self) -> str:
7479
"""Get the current environment file name."""

0 commit comments

Comments
 (0)