Skip to content

Commit a3870c0

Browse files
Merge branch 'master' into feat/execute-code-tool
2 parents ebc37c2 + c3d726a commit a3870c0

18 files changed

Lines changed: 2005 additions & 162 deletions

File tree

.claude/skills/wt/SKILL.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,20 @@ Create a new worktree in `worktree/<branch-name>` with branch `<branch-name>`.
1313

1414
```bash
1515
# Return to repo root
16-
cd /home/julien/github/ha-mcp
16+
cd "$(git rev-parse --show-toplevel)"
1717

1818
# Pull latest master
1919
git checkout master
2020
git pull origin master
2121

2222
# Create worktree
23-
git worktree add worktree/$ARGUMENTS -b $ARGUMENTS
23+
git worktree add worktree/"$ARGUMENTS" -b "$ARGUMENTS"
24+
25+
# Initialize submodules (skills-vendor)
26+
git -C worktree/"$ARGUMENTS" submodule update --init --recursive
2427

2528
# Navigate to worktree
26-
cd worktree/$ARGUMENTS
29+
cd worktree/"$ARGUMENTS"
2730

2831
# Confirm location and branch
2932
echo ""
@@ -37,5 +40,5 @@ echo "You can now work in this isolated environment."
3740
## Notes
3841

3942
- Worktree inherits `.claude/agents/` workflows
40-
- To remove when done: `cd ../.. && git worktree remove worktree/$ARGUMENTS`
43+
- To remove when done: `cd ../.. && git worktree remove worktree/"$ARGUMENTS"`
4144
- List all worktrees: `git worktree list`

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Spend less time configuring, more time enjoying your smart home.
148148
| **Groups** | `ha_config_list_groups`, `ha_config_remove_group`, `ha_config_set_group` |
149149
| **HACS** | `ha_hacs_add_repository`, `ha_hacs_download`, `ha_hacs_info`, `ha_hacs_list_installed`, `ha_hacs_repository_info`, `ha_hacs_search` |
150150
| **Helper Entities** | `ha_config_list_helpers`, `ha_config_remove_helper`, `ha_config_set_helper`, `ha_get_helper_schema`, `ha_set_config_entry_helper` |
151-
| **History & Statistics** | `ha_get_automation_traces`, `ha_get_history`, `ha_get_logbook`, `ha_get_statistics` |
151+
| **History & Statistics** | `ha_get_automation_traces`, `ha_get_history`, `ha_get_logs`, `ha_get_statistics` |
152152
| **Integrations** | `ha_delete_config_entry`, `ha_get_integration`, `ha_set_integration_enabled` |
153153
| **Labels & Categories** | `ha_config_get_category`, `ha_config_get_label`, `ha_config_remove_category`, `ha_config_remove_label`, `ha_config_set_category`, `ha_config_set_label` |
154154
| **Scripts** | `ha_config_get_script`, `ha_config_remove_script`, `ha_config_set_script` |
@@ -253,6 +253,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
253253
- **[@smenzer](https://github.com/smenzer)** — Documentation fix.
254254
- **[@The-Greg-O](https://github.com/The-Greg-O)** — REST API for config entry deletion.
255255
- **[@restriction](https://github.com/restriction)** — Responsible disclosure: python_transform sandbox missing call target validation.
256+
- **[@lcrostarosa](https://github.com/lcrostarosa)** — Diagnostic and health monitoring tools concept (#675), inspiring system/error logs, repairs, and ZHA radio metrics integration.
256257

257258
---
258259

homeassistant-addon/DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ The add-on provides 80+ MCP tools for controlling Home Assistant:
388388
- `ha_backup_restore` - Restore from backup
389389

390390
### Utility
391-
- `ha_get_logbook` - Historical events
391+
- `ha_get_logs` - Logs (logbook, system, error, supervisor)
392392
- `ha_eval_template` - Evaluate Jinja2 templates
393393
- Domain documentation available via the `ha_get_skill_home_assistant_best_practices` skill
394394
- `ha_get_integration` - List or get integration info

site/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/data/tools.json

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,8 @@
731731
},
732732
{
733733
"name": "ha_get_device",
734-
"title": "Get Device",
735-
"description": "Get device information - list all devices or get details for a specific one.\n\nWithout device_id/entity_id: Lists all devices with optional filters.\nWith device_id or entity_id: Returns detailed info for that specific device.\n\n**List all devices:**\n- All devices: ha_get_device()\n- By area: ha_get_device(area_id=\"living_room\")\n- By manufacturer: ha_get_device(manufacturer=\"Philips\")\n- By integration: ha_get_device(integration=\"zigbee2mqtt\")\n- Combined filters: ha_get_device(integration=\"zha\", area_id=\"kitchen\")\n\n**Single device lookup:**\n- By device_id: ha_get_device(device_id=\"abc123\")\n- By entity_id: ha_get_device(entity_id=\"light.living_room\")\n\n**Zigbee automation tips:**\n- ZHA triggers: Use `ieee_address` for zha_event triggers\n- Z2M triggers: Use `friendly_name` for MQTT topics (zigbee2mqtt/{friendly_name}/action)\n\n**Returns (list mode):**\n- List of devices with device_id, name, manufacturer, model, area_id\n\n**Returns (single device):**\n- Full device details including integration_type, ieee_address, entities",
734+
"title": "Get Device (incl. Zigbee/ZHA/Z2M and Z-Wave)",
735+
"description": "Get device information, including Zigbee (ZHA/Z2M) and Z-Wave JS devices with protocol-specific details.\n\nWithout device_id/entity_id: Lists all devices with optional filters.\nWith device_id or entity_id: Returns detailed info for that specific device.\n\n**List all devices:**\n- All devices: ha_get_device()\n- By area: ha_get_device(area_id=\"living_room\")\n- By manufacturer: ha_get_device(manufacturer=\"Philips\")\n- By integration: ha_get_device(integration=\"zigbee2mqtt\")\n- Combined filters: ha_get_device(integration=\"zha\", area_id=\"kitchen\")\n\n**Single device lookup:**\n- By device_id: ha_get_device(device_id=\"abc123\")\n- By entity_id: ha_get_device(entity_id=\"light.living_room\")\n\n**Zigbee device support:**\n- Use integration=\"zha\" or integration=\"zigbee2mqtt\" to list Zigbee devices\n- Returns ieee_address, integration_type, and radio metrics (LQI/RSSI) for ZHA devices\n- ZHA triggers: Use `ieee_address` for zha_event triggers\n- Z2M triggers: Use `friendly_name` for MQTT topics (zigbee2mqtt/{friendly_name}/action)\n\n**Z-Wave JS device support:**\n- Use integration=\"zwave_js\" to list Z-Wave devices\n- Returns node_id extracted from device identifiers\n- Single device lookup includes node_status (security class, routing, Z-Wave+ version)\n\n**Returns (list mode):**\n- List of devices with device_id, name, manufacturer, model, area_id\n\n**Returns (single device):**\n- Full device details including integration_type, ieee_address/node_id, radio_metrics/node_status, entities",
736736
"inputSchema": {
737737
"properties": {
738738
"device_id": {
@@ -744,7 +744,7 @@
744744
"default": null
745745
},
746746
"integration": {
747-
"type": "Annotated[str | None, Field(description=\"Filter devices by integration: 'zha', 'zigbee2mqtt', 'mqtt', 'hue', etc.\", default=None)]",
747+
"type": "Annotated[str | None, Field(description=\"Filter devices by integration: 'zha', 'zigbee2mqtt', 'zwave_js', 'mqtt', 'hue', etc.\", default=None)]",
748748
"default": null
749749
},
750750
"area_id": {
@@ -762,7 +762,9 @@
762762
"readOnlyHint": true
763763
},
764764
"tags": [
765-
"Device Registry"
765+
"Device Registry",
766+
"Z-Wave",
767+
"Zigbee"
766768
],
767769
"source_file": "tools_registry.py"
768770
},
@@ -1671,11 +1673,23 @@
16711673
"source_file": "tools_history.py"
16721674
},
16731675
{
1674-
"name": "ha_get_logbook",
1675-
"title": "Get Logbook Entries",
1676-
"description": "Get Home Assistant logbook entries for the specified time period.\n\nReturns paginated logbook entries to prevent excessively large responses.\n\n**Parameters:**\n- hours_back: Number of hours to look back (default: 1)\n- entity_id: Optional entity ID to filter entries\n- end_time: Optional end time in ISO format (defaults to now)\n- limit: Maximum number of entries to return (default: 50, max: 500)\n- offset: Number of entries to skip for pagination (default: 0)\n- compact: Return only essential fields per entry (default: True).\n When True, each entry contains only: when, entity_id, state, name, message, domain, context_id.\n Set to False to include full attribute dictionaries and all fields.\n\n**Pagination:**\nWhen the logbook has more entries than the limit, use offset to get\nadditional pages. The response includes `has_more` to indicate if\nmore entries are available.\n\n**IMPORTANT - Pagination Stability:**\nPagination is performed client-side on the full result set returned\nby Home Assistant. If new logbook entries are created between page\nrequests, results may shift and items could be missed or duplicated\nacross pages. For best results, use consistent time ranges (start/end)\nand retrieve pages in quick succession.\n\n**Example:**\n- First page: ha_get_logbook(hours_back=24, limit=50, offset=0)\n- Second page: ha_get_logbook(hours_back=24, limit=50, offset=50)\n- Full details: ha_get_logbook(hours_back=1, compact=False)",
1676+
"name": "ha_get_logs",
1677+
"title": "Get Logs",
1678+
"description": "Get Home Assistant logs from various sources.\n\n**Sources:**\n- \"logbook\" (default): Entity state change history with pagination\n- \"system\": Structured system log entries (errors, warnings) via system_log/list\n- \"error_log\": Raw home-assistant.log text\n- \"supervisor\": Add-on container logs (requires slug parameter)\n\n**Shared params:** limit, search (keyword filter on entries/lines)\n**Logbook params:** hours_back, entity_id, end_time, offset, compact (default True — strips attribute dicts to save context)\n**System/error_log params:** level (ERROR, WARNING, INFO, DEBUG)\n**Supervisor params:** slug (add-on slug, e.g. \"core_mosquitto\")",
16771679
"inputSchema": {
16781680
"properties": {
1681+
"source": {
1682+
"type": "Literal['logbook', 'system', 'error_log', 'supervisor']",
1683+
"default": "logbook"
1684+
},
1685+
"limit": {
1686+
"type": "int | str | None",
1687+
"default": null
1688+
},
1689+
"search": {
1690+
"type": "str | None",
1691+
"default": null
1692+
},
16791693
"hours_back": {
16801694
"type": "int | str",
16811695
"default": 1
@@ -1688,17 +1702,21 @@
16881702
"type": "str | None",
16891703
"default": null
16901704
},
1691-
"limit": {
1692-
"type": "int | str | None",
1693-
"default": null
1694-
},
16951705
"offset": {
16961706
"type": "int | str",
16971707
"default": 0
16981708
},
16991709
"compact": {
17001710
"type": "bool | str",
17011711
"default": true
1712+
},
1713+
"level": {
1714+
"type": "str | None",
1715+
"default": null
1716+
},
1717+
"slug": {
1718+
"type": "str | None",
1719+
"default": null
17021720
}
17031721
}
17041722
},
@@ -2139,15 +2157,27 @@
21392157
{
21402158
"name": "ha_get_overview",
21412159
"title": "Get System Overview",
2142-
"description": "Get AI-friendly system overview with intelligent categorization.\n\nReturns comprehensive system information at the requested detail level,\nincluding Home Assistant base_url, version, location, timezone, entity overview,\nand active persistent notifications (if any).\nDefault is 'minimal' — use this unless you specifically need all entities.",
2160+
"description": "Get AI-friendly system overview with intelligent categorization.\n\nReturns comprehensive system information at the requested detail level,\nincluding Home Assistant base_url, version, location, timezone, entity overview,\nand active persistent notifications (if any).\nUse 'minimal' (default) for most queries. Domain counts and states_summary\nare always complete regardless of entity pagination.\nStandard/full modes paginate entities (default 200 per page) — use offset\nto fetch more. Use 'domains' filter to narrow scope.",
21432161
"inputSchema": {
21442162
"properties": {
21452163
"detail_level": {
2146-
"type": "Annotated[Literal['minimal', 'standard', 'full'], Field(default='minimal', description=\"'minimal': 10 entities per domain sample (default); 'standard': ALL entities per domain (friendly_name only); 'full': ALL entities with entity_id + friendly_name + state + system_info\")]",
2164+
"type": "Annotated[Literal['minimal', 'standard', 'full'], Field(default='minimal', description=\"'minimal': 10 entities/domain, top-5 states (default); 'standard': 200 entities/page, top-10 states (use offset for more); 'full': 200 entities/page + entity_id + state + full states. Use 'domains', 'limit', or max_entities_per_domain to control size\")]",
21472165
"default": "minimal"
21482166
},
2167+
"domains": {
2168+
"type": "Annotated[str | list[str] | None, Field(default=None, description=\"Filter to specific domains (e.g. 'light,sensor' or ['light','sensor']). None = all domains. Useful to avoid context window overload.\")]",
2169+
"default": null
2170+
},
2171+
"limit": {
2172+
"type": "Annotated[int | str | None, Field(default=None, description='Max total entities across all domains (default: unlimited for minimal, 200 for standard/full). Counts and states always complete. Use with offset for pagination.')]",
2173+
"default": null
2174+
},
2175+
"offset": {
2176+
"type": "Annotated[int | str, Field(default=0, description='Number of entities to skip for pagination (default: 0)')]",
2177+
"default": 0
2178+
},
21492179
"max_entities_per_domain": {
2150-
"type": "Annotated[int | None, Field(default=None, description='Override max entities per domain (None = all). Minimal defaults to 10.')]",
2180+
"type": "Annotated[int | None, Field(default=None, description='Override default entity cap per domain (minimal=10, standard/full=unlimited). 0 = no limit on entities or states.')]",
21512181
"default": null
21522182
},
21532183
"include_state": {
@@ -2486,15 +2516,24 @@
24862516
},
24872517
{
24882518
"name": "ha_get_system_health",
2489-
"title": "Get System Health",
2490-
"description": "Get Home Assistant system health information.\n\nReturns health check results from integrations, system resources, and connectivity.\nAvailable information varies by installation type and loaded integrations.",
2491-
"inputSchema": {},
2519+
"title": "Get System Health (incl. ZHA/Z-Wave diagnostics)",
2520+
"description": "Get Home Assistant system health, including Zigbee (ZHA) and Z-Wave JS network diagnostics.\n\nReturns health check results from integrations, system resources, and connectivity.\nAvailable information varies by installation type and loaded integrations.\n\n**Parameters:**\n- include: Optional comma-separated list of additional data to include.\n - \"repairs\": Repair items from Settings > System > Repairs\n - \"zha_network\": ZHA Zigbee devices with radio signal summary (name, LQI, RSSI)\n - \"zha_network_full\": ZHA Zigbee devices with all device details (can be large on 100+ device networks; prefer \"zha_network\" for summary)\n - \"zwave_network\": Z-Wave JS network status and node summary (status, security, routing)\n - Example: include=\"repairs,zha_network,zwave_network\"",
2521+
"inputSchema": {
2522+
"properties": {
2523+
"include": {
2524+
"type": "str | None",
2525+
"default": null
2526+
}
2527+
}
2528+
},
24922529
"annotations": {
24932530
"idempotentHint": true,
24942531
"readOnlyHint": true
24952532
},
24962533
"tags": [
2497-
"System"
2534+
"System",
2535+
"Z-Wave",
2536+
"Zigbee"
24982537
],
24992538
"source_file": "tools_system.py"
25002539
},

0 commit comments

Comments
 (0)