ha-mcp-dev 7.4.1.dev472__tar.gz → 7.4.1.dev474__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ha_mcp_dev-7.4.1.dev472/src/ha_mcp_dev.egg-info → ha_mcp_dev-7.4.1.dev474}/PKG-INFO +1 -1
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/pyproject.toml +1 -1
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_dashboards.py +31 -42
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_scenes.py +7 -10
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/python_sandbox.py +11 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474/src/ha_mcp_dev.egg-info}/PKG-INFO +1 -1
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/LICENSE +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/MANIFEST.in +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/README.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/setup.cfg +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/__main__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/_pypi_marker +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/_version.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/auth/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/auth/consent_form.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/auth/provider.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/client/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/client/rest_client.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/client/supervisor_client.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/client/websocket_client.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/client/websocket_listener.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/config.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/errors.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/py.typed +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/.claude/settings.json +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/.claude-plugin/marketplace.json +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/.claude-plugin/plugin.json +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/.github/ISSUE_TEMPLATE/skill-rca.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/AGENTS.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/CLAUDE.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/CONTRIBUTING.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/LICENSE +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/README.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/SKILL.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/evals/evals.json +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/automation-patterns.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-cards.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-guide.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/device-control.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/domain-docs.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/examples.yaml +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/helper-selection.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/safe-refactoring.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/template-guidelines.md +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/server.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/settings_ui.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/smoke_test.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/backup.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/best_practice_checker.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/device_control.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/enhanced.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/reference_validator.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/registry.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/smart_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_addons.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_areas.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_blueprints.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_bug_report.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_calendar.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_camera.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_categories.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_code.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_automations.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_entry_flow.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_scripts.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_energy.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_entities.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_filesystem.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_groups.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_hacs.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_history.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_integrations.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_labels.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_mcp_component.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_registry.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_resources.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_service.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_services.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_system.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_todo.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_traces.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_updates.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_utility.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_voice_assistant.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_yaml_config.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_zones.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/util_helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/transforms/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/transforms/categorized_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/config_hash.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/data_paths.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/domain_handlers.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/fuzzy_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/kill_signal_diagnostics.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/operation_manager.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/usage_logger.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/SOURCES.txt +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/dependency_links.txt +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/entry_points.txt +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/requires.txt +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/top_level.txt +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/tests/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/tests/test_constants.py +0 -0
- {ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/tests/test_env_manager.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ha-mcp-dev"
|
|
7
|
-
version = "7.4.1.
|
|
7
|
+
version = "7.4.1.dev474"
|
|
8
8
|
description = "Home Assistant MCP Server - Complete control of Home Assistant through MCP"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.13,<3.14"
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_dashboards.py
RENAMED
|
@@ -265,6 +265,32 @@ def _should_lazy_resolve(error_msg: str) -> bool:
|
|
|
265
265
|
return _LAZY_RESOLVE_TRIGGER in error_msg
|
|
266
266
|
|
|
267
267
|
|
|
268
|
+
async def _fetch_dashboards_list(
|
|
269
|
+
client: Any,
|
|
270
|
+
) -> list[dict[str, Any]] | None:
|
|
271
|
+
"""Fetch and normalise the lovelace/dashboards/list WebSocket response.
|
|
272
|
+
|
|
273
|
+
Returns the list of dashboard registry entries on success, or ``None``
|
|
274
|
+
when the response shape is unrecognised. A warning is logged on
|
|
275
|
+
unexpected shapes so that future HA response-format changes surface at
|
|
276
|
+
every fetch site rather than silently degrading.
|
|
277
|
+
|
|
278
|
+
Callers decide how to handle ``None`` (e.g. fall through to ``[]`` or
|
|
279
|
+
propagate the failure).
|
|
280
|
+
"""
|
|
281
|
+
result = await client.send_websocket_message({"type": "lovelace/dashboards/list"})
|
|
282
|
+
if isinstance(result, dict) and isinstance(result.get("result"), list):
|
|
283
|
+
return cast(list[dict[str, Any]], result["result"])
|
|
284
|
+
if isinstance(result, list):
|
|
285
|
+
return cast(list[dict[str, Any]], result)
|
|
286
|
+
logger.warning(
|
|
287
|
+
"lovelace/dashboards/list returned an unexpected shape (type=%s); "
|
|
288
|
+
"treating as no-match",
|
|
289
|
+
type(result).__name__,
|
|
290
|
+
)
|
|
291
|
+
return None
|
|
292
|
+
|
|
293
|
+
|
|
268
294
|
async def _resolve_dashboard(
|
|
269
295
|
client: Any, identifier: str
|
|
270
296
|
) -> tuple[dict[str, str] | None, list[dict[str, Any]] | None]:
|
|
@@ -297,21 +323,8 @@ async def _resolve_dashboard(
|
|
|
297
323
|
to the registry id before issuing the delete. Discards
|
|
298
324
|
``dashboards``.
|
|
299
325
|
"""
|
|
300
|
-
|
|
301
|
-
if
|
|
302
|
-
dashboards = result["result"]
|
|
303
|
-
elif isinstance(result, list):
|
|
304
|
-
dashboards = result
|
|
305
|
-
else:
|
|
306
|
-
# Neither dict-with-result nor list — either HA returned an error
|
|
307
|
-
# envelope (unknown shape) or the response format changed.
|
|
308
|
-
# Surface a warning so the next response-shape change isn't a
|
|
309
|
-
# silent "always no match" regression.
|
|
310
|
-
logger.warning(
|
|
311
|
-
"lovelace/dashboards/list returned an unexpected shape (type=%s); "
|
|
312
|
-
"treating as no-match",
|
|
313
|
-
type(result).__name__,
|
|
314
|
-
)
|
|
326
|
+
dashboards = await _fetch_dashboards_list(client)
|
|
327
|
+
if dashboards is None:
|
|
315
328
|
return None, None
|
|
316
329
|
|
|
317
330
|
for d in dashboards:
|
|
@@ -527,16 +540,7 @@ def register_config_dashboard_tools(mcp: Any, client: Any, **kwargs: Any) -> Non
|
|
|
527
540
|
try:
|
|
528
541
|
# List mode
|
|
529
542
|
if list_only:
|
|
530
|
-
|
|
531
|
-
{"type": "lovelace/dashboards/list"}
|
|
532
|
-
)
|
|
533
|
-
if isinstance(result, dict) and "result" in result:
|
|
534
|
-
dashboards = result["result"]
|
|
535
|
-
elif isinstance(result, list):
|
|
536
|
-
dashboards = result
|
|
537
|
-
else:
|
|
538
|
-
dashboards = []
|
|
539
|
-
|
|
543
|
+
dashboards = await _fetch_dashboards_list(client) or []
|
|
540
544
|
return {
|
|
541
545
|
"success": True,
|
|
542
546
|
"action": "list",
|
|
@@ -1158,24 +1162,9 @@ def register_config_dashboard_tools(mcp: Any, client: Any, **kwargs: Any) -> Non
|
|
|
1158
1162
|
if pre_fetched_dashboards is not None:
|
|
1159
1163
|
existing_dashboards = pre_fetched_dashboards
|
|
1160
1164
|
else:
|
|
1161
|
-
|
|
1162
|
-
|
|
1165
|
+
existing_dashboards = (
|
|
1166
|
+
await _fetch_dashboards_list(client) or []
|
|
1163
1167
|
)
|
|
1164
|
-
if isinstance(result, dict) and "result" in result:
|
|
1165
|
-
existing_dashboards = result["result"]
|
|
1166
|
-
elif isinstance(result, list):
|
|
1167
|
-
existing_dashboards = result
|
|
1168
|
-
else:
|
|
1169
|
-
# Mirror the warning emitted by ``_resolve_dashboard`` on
|
|
1170
|
-
# the same response-shape failure, so a future HA shape
|
|
1171
|
-
# change shows up at every fetch site rather than going
|
|
1172
|
-
# silent on this one.
|
|
1173
|
-
logger.warning(
|
|
1174
|
-
"lovelace/dashboards/list returned an unexpected shape "
|
|
1175
|
-
"(type=%s); treating as no-match",
|
|
1176
|
-
type(result).__name__,
|
|
1177
|
-
)
|
|
1178
|
-
existing_dashboards = []
|
|
1179
1168
|
dashboard_exists = any(
|
|
1180
1169
|
d.get("url_path") == url_path for d in existing_dashboards
|
|
1181
1170
|
)
|
|
@@ -23,6 +23,7 @@ from ..errors import ErrorCode, create_error_response
|
|
|
23
23
|
from ..utils.config_hash import compute_config_hash
|
|
24
24
|
from ..utils.python_sandbox import (
|
|
25
25
|
PythonSandboxError,
|
|
26
|
+
format_sandbox_error,
|
|
26
27
|
get_security_documentation,
|
|
27
28
|
safe_execute,
|
|
28
29
|
)
|
|
@@ -572,16 +573,12 @@ class ConfigSceneTools:
|
|
|
572
573
|
try:
|
|
573
574
|
transformed_config = safe_execute(python_transform, actual_config)
|
|
574
575
|
except PythonSandboxError as e:
|
|
576
|
+
message, suggestions = format_sandbox_error(e, python_transform)
|
|
575
577
|
raise_tool_error(
|
|
576
578
|
create_error_response(
|
|
577
579
|
ErrorCode.VALIDATION_FAILED,
|
|
578
|
-
|
|
579
|
-
suggestions=
|
|
580
|
-
"Check expression syntax",
|
|
581
|
-
"Ensure only allowed operations are used",
|
|
582
|
-
"See tool description for allowed operations",
|
|
583
|
-
f"Expression: {python_transform[:100]}{'...' if len(python_transform) > 100 else ''}",
|
|
584
|
-
],
|
|
580
|
+
message,
|
|
581
|
+
suggestions=suggestions,
|
|
585
582
|
context={
|
|
586
583
|
"action": "python_transform",
|
|
587
584
|
"scene_id": resolved_id,
|
|
@@ -656,9 +653,9 @@ class ConfigSceneTools:
|
|
|
656
653
|
# is the in-place equivalent of ``del`` — normalise both
|
|
657
654
|
# by checking against ``(None, resolved_id)``, so only an
|
|
658
655
|
# explicit non-None mismatch triggers the reject.
|
|
659
|
-
if (
|
|
660
|
-
|
|
661
|
-
|
|
656
|
+
if "id" in transformed_config and transformed_config["id"] not in (
|
|
657
|
+
None,
|
|
658
|
+
resolved_id,
|
|
662
659
|
):
|
|
663
660
|
raise_tool_error(
|
|
664
661
|
create_error_response(
|
|
@@ -472,6 +472,17 @@ def format_sandbox_error(
|
|
|
472
472
|
"See tool description for allowed operations",
|
|
473
473
|
f"Expression: {preview}",
|
|
474
474
|
]
|
|
475
|
+
# Agents commonly emit ``\"`` (intending a JSON-style quote escape)
|
|
476
|
+
# inside transforms. Outside Python string literals this is a
|
|
477
|
+
# line-continuation token followed by an unexpected character.
|
|
478
|
+
# Pinpoint the actual mistake so the agent fixes it on the first
|
|
479
|
+
# retry instead of guessing at "syntax".
|
|
480
|
+
if "line continuation character" in str(error):
|
|
481
|
+
suggestions.insert(
|
|
482
|
+
0,
|
|
483
|
+
'Remove the leading backslash before quotes — write "foo" '
|
|
484
|
+
'not \\"foo\\" in the Python source.',
|
|
485
|
+
)
|
|
475
486
|
if variable_name != "config":
|
|
476
487
|
suggestions = [
|
|
477
488
|
f"Operate on the `{variable_name}` variable (in-place or reassign)",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/AGENTS.md
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/CLAUDE.md
RENAMED
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/LICENSE
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/resources/skills-vendor/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/best_practice_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_automations.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_entry_flow.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_helpers.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_config_scripts.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/tools/tools_voice_assistant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/transforms/categorized_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp/utils/kill_signal_diagnostics.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev472 → ha_mcp_dev-7.4.1.dev474}/src/ha_mcp_dev.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|