ha-mcp-dev 7.5.0.dev528__tar.gz → 7.5.0.dev530__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.
Files changed (111) hide show
  1. {ha_mcp_dev-7.5.0.dev528/src/ha_mcp_dev.egg-info → ha_mcp_dev-7.5.0.dev530}/PKG-INFO +1 -1
  2. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/pyproject.toml +1 -1
  3. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_bug_report.py +11 -2
  4. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_scenes.py +42 -41
  5. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530/src/ha_mcp_dev.egg-info}/PKG-INFO +1 -1
  6. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/LICENSE +0 -0
  7. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/MANIFEST.in +0 -0
  8. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/README.md +0 -0
  9. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/setup.cfg +0 -0
  10. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/__init__.py +0 -0
  11. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/__main__.py +0 -0
  12. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/_pypi_marker +0 -0
  13. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/_version.py +0 -0
  14. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/auth/__init__.py +0 -0
  15. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/auth/consent_form.py +0 -0
  16. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/auth/provider.py +0 -0
  17. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/client/__init__.py +0 -0
  18. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/client/rest_client.py +0 -0
  19. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/client/supervisor_client.py +0 -0
  20. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/client/websocket_client.py +0 -0
  21. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/client/websocket_listener.py +0 -0
  22. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/config.py +0 -0
  23. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/errors.py +0 -0
  24. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/py.typed +0 -0
  25. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/.claude/settings.json +0 -0
  26. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/.claude-plugin/marketplace.json +0 -0
  27. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/.claude-plugin/plugin.json +0 -0
  28. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/.github/ISSUE_TEMPLATE/skill-rca.md +0 -0
  29. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/AGENTS.md +0 -0
  30. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/CLAUDE.md +0 -0
  31. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/CONTRIBUTING.md +0 -0
  32. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/LICENSE +0 -0
  33. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/README.md +0 -0
  34. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/SKILL.md +0 -0
  35. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/evals/evals.json +0 -0
  36. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/automation-patterns.md +0 -0
  37. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-cards.md +0 -0
  38. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-guide.md +0 -0
  39. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/device-control.md +0 -0
  40. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/domain-docs.md +0 -0
  41. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/examples.yaml +0 -0
  42. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/helper-selection.md +0 -0
  43. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/safe-refactoring.md +0 -0
  44. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/template-guidelines.md +0 -0
  45. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/server.py +0 -0
  46. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/settings_ui.py +0 -0
  47. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/smoke_test.py +0 -0
  48. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/__init__.py +0 -0
  49. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/backup.py +0 -0
  50. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/best_practice_checker.py +0 -0
  51. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/device_control.py +0 -0
  52. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/enhanced.py +0 -0
  53. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/helpers.py +0 -0
  54. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/reference_validator.py +0 -0
  55. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/registry.py +0 -0
  56. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/smart_search.py +0 -0
  57. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_addons.py +0 -0
  58. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_areas.py +0 -0
  59. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_blueprints.py +0 -0
  60. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_calendar.py +0 -0
  61. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_camera.py +0 -0
  62. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_categories.py +0 -0
  63. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_code.py +0 -0
  64. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_automations.py +0 -0
  65. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_dashboards.py +0 -0
  66. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_entry_flow.py +0 -0
  67. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_helpers.py +0 -0
  68. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_config_scripts.py +0 -0
  69. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_energy.py +0 -0
  70. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_entities.py +0 -0
  71. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_filesystem.py +0 -0
  72. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_groups.py +0 -0
  73. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_hacs.py +0 -0
  74. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_history.py +0 -0
  75. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_integrations.py +0 -0
  76. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_labels.py +0 -0
  77. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_mcp_component.py +0 -0
  78. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_registry.py +0 -0
  79. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_resources.py +0 -0
  80. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_search.py +0 -0
  81. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_service.py +0 -0
  82. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_services.py +0 -0
  83. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_system.py +0 -0
  84. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_todo.py +0 -0
  85. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_traces.py +0 -0
  86. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_updates.py +0 -0
  87. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_utility.py +0 -0
  88. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_voice_assistant.py +0 -0
  89. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_yaml_config.py +0 -0
  90. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/tools_zones.py +0 -0
  91. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/tools/util_helpers.py +0 -0
  92. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/transforms/__init__.py +0 -0
  93. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/transforms/categorized_search.py +0 -0
  94. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/transforms/lite_docstrings.py +0 -0
  95. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/__init__.py +0 -0
  96. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/config_hash.py +0 -0
  97. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/data_paths.py +0 -0
  98. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/domain_handlers.py +0 -0
  99. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/fuzzy_search.py +0 -0
  100. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/kill_signal_diagnostics.py +0 -0
  101. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/operation_manager.py +0 -0
  102. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/python_sandbox.py +0 -0
  103. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp/utils/usage_logger.py +0 -0
  104. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp_dev.egg-info/SOURCES.txt +0 -0
  105. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp_dev.egg-info/dependency_links.txt +0 -0
  106. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp_dev.egg-info/entry_points.txt +0 -0
  107. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp_dev.egg-info/requires.txt +0 -0
  108. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/src/ha_mcp_dev.egg-info/top_level.txt +0 -0
  109. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/tests/__init__.py +0 -0
  110. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/tests/test_constants.py +0 -0
  111. {ha_mcp_dev-7.5.0.dev528 → ha_mcp_dev-7.5.0.dev530}/tests/test_env_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ha-mcp-dev
3
- Version: 7.5.0.dev528
3
+ Version: 7.5.0.dev530
4
4
  Summary: Home Assistant MCP Server - Complete control of Home Assistant through MCP
5
5
  Author-email: Julien <github@qc-h.net>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ha-mcp-dev"
7
- version = "7.5.0.dev528"
7
+ version = "7.5.0.dev530"
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"
@@ -20,6 +20,7 @@ from pydantic import Field
20
20
 
21
21
  from ha_mcp import __version__
22
22
 
23
+ from .._version import is_running_in_addon
23
24
  from ..client.supervisor_client import make_supervisor_httpx_client
24
25
  from ..config import Settings, get_global_settings
25
26
  from ..utils.usage_logger import (
@@ -71,7 +72,7 @@ def _detect_installation_method() -> str:
71
72
  return "pyinstaller"
72
73
 
73
74
  # 2. Home Assistant Add-on (has supervisor token)
74
- if os.environ.get("SUPERVISOR_TOKEN"):
75
+ if is_running_in_addon():
75
76
  return "addon"
76
77
 
77
78
  # 3. Docker container (non-addon)
@@ -262,6 +263,14 @@ def _detect_mcp_transport() -> str:
262
263
  if os.environ.get("MCP_HTTP_PORT") or os.environ.get("FASTMCP_PORT"):
263
264
  return "http"
264
265
 
266
+ # Home Assistant add-on always runs HTTP via homeassistant-addon/start.py.
267
+ # Placed after the explicit hints (argv0 / env) so an operator override
268
+ # still wins, but before the stdin-isatty fallback because Supervisor-
269
+ # launched containers have no TTY on stdin and would otherwise be
270
+ # mislabeled stdio.
271
+ if is_running_in_addon():
272
+ return "http"
273
+
265
274
  # If stdin is piped (not a TTY), ha-mcp was launched by an MCP host on
266
275
  # stdio. If it IS a TTY, this is a manual / interactive run with no
267
276
  # other transport hints — fall through to ``unknown``.
@@ -349,7 +358,7 @@ async def _fetch_addon_logs() -> str:
349
358
  """
350
359
  # Redundant with the caller's `install_method == "addon"` gate, but kept
351
360
  # as a defensive guard for any direct callers added later.
352
- if not os.environ.get("SUPERVISOR_TOKEN"):
361
+ if not is_running_in_addon():
353
362
  return ""
354
363
 
355
364
  try:
@@ -32,6 +32,7 @@ from .helpers import (
32
32
  log_tool_usage,
33
33
  raise_tool_error,
34
34
  register_tool_methods,
35
+ validate_identifier_not_empty,
35
36
  )
36
37
  from .reference_validator import validate_config_references
37
38
  from .util_helpers import (
@@ -221,20 +222,20 @@ class ConfigSceneTools:
221
222
  # Issue #1168 R6 blocker 16: empty ``scene_id`` previously
222
223
  # surfaced as ``RESOURCE_NOT_FOUND`` with a misleading
223
224
  # `entities`-related suggestion. Pre-flight here so the caller
224
- # gets the actual problem.
225
- if not scene_id or not scene_id.strip():
226
- raise_tool_error(
227
- create_error_response(
228
- ErrorCode.VALIDATION_INVALID_PARAMETER,
229
- "scene_id must not be empty",
230
- suggestions=[
231
- "Pass a non-empty scene identifier (e.g. 'movie_night')",
232
- "Use ha_search_entities(domain_filter='scene') "
233
- "to find existing scene_ids",
234
- ],
235
- context={"scene_id": scene_id},
236
- )
237
- )
225
+ # gets the actual problem. Migrated to the shared
226
+ # ``validate_identifier_not_empty`` helper (#1314) message
227
+ # and ``context["scene_id"]`` key preserved for callers.
228
+ validate_identifier_not_empty(
229
+ scene_id,
230
+ "scene_id",
231
+ message="scene_id must not be empty",
232
+ suggestions=[
233
+ "Pass a non-empty scene identifier (e.g. 'movie_night')",
234
+ "Use ha_search_entities(domain_filter='scene') "
235
+ "to find existing scene_ids",
236
+ ],
237
+ context={"scene_id": scene_id},
238
+ )
238
239
  # Issue #1168 R3 blockers 3 + 6: unwrap the rest-client envelope
239
240
  # so the response carries the scene body directly (no nested
240
241
  # `success`/`scene_id`/`config` chain), and use the storage key
@@ -520,19 +521,19 @@ class ConfigSceneTools:
520
521
  # Issue #1168 R6 blocker 16: empty ``scene_id`` pre-flight before
521
522
  # any config dispatch — keeps the error code/message aligned with
522
523
  # the actual problem rather than the misleading
523
- # ``RESOURCE_NOT_FOUND`` from a downstream lookup.
524
- if not scene_id or not scene_id.strip():
525
- raise_tool_error(
526
- create_error_response(
527
- ErrorCode.VALIDATION_INVALID_PARAMETER,
528
- "scene_id must not be empty",
529
- suggestions=[
530
- "Pass a non-empty scene identifier (e.g. 'movie_night')",
531
- "For a fresh create, use a name-derived slug",
532
- ],
533
- context={"scene_id": scene_id},
534
- )
535
- )
524
+ # ``RESOURCE_NOT_FOUND`` from a downstream lookup. Migrated to
525
+ # the shared ``validate_identifier_not_empty`` helper (#1314)
526
+ # message and ``context["scene_id"]`` key preserved for callers.
527
+ validate_identifier_not_empty(
528
+ scene_id,
529
+ "scene_id",
530
+ message="scene_id must not be empty",
531
+ suggestions=[
532
+ "Pass a non-empty scene identifier (e.g. 'movie_night')",
533
+ "For a fresh create, use a name-derived slug",
534
+ ],
535
+ context={"scene_id": scene_id},
536
+ )
536
537
  # Validate mutual exclusivity of config and python_transform
537
538
  if config is not None and python_transform is not None:
538
539
  raise_tool_error(
@@ -942,20 +943,20 @@ class ConfigSceneTools:
942
943
  try:
943
944
  # Issue #1168 R6 blocker 16: empty ``scene_id`` pre-flight before
944
945
  # the resolver — keeps the error code/message aligned with the
945
- # actual problem.
946
- if not scene_id or not scene_id.strip():
947
- raise_tool_error(
948
- create_error_response(
949
- ErrorCode.VALIDATION_INVALID_PARAMETER,
950
- "scene_id must not be empty",
951
- suggestions=[
952
- "Pass a non-empty scene identifier (e.g. 'old_scene')",
953
- "Use ha_search_entities(domain_filter='scene') "
954
- "to find existing scene_ids",
955
- ],
956
- context={"scene_id": scene_id},
957
- )
958
- )
946
+ # actual problem. Migrated to the shared
947
+ # ``validate_identifier_not_empty`` helper (#1314) message
948
+ # and ``context["scene_id"]`` key preserved for callers.
949
+ validate_identifier_not_empty(
950
+ scene_id,
951
+ "scene_id",
952
+ message="scene_id must not be empty",
953
+ suggestions=[
954
+ "Pass a non-empty scene identifier (e.g. 'old_scene')",
955
+ "Use ha_search_entities(domain_filter='scene') "
956
+ "to find existing scene_ids",
957
+ ],
958
+ context={"scene_id": scene_id},
959
+ )
959
960
  # Issue #1168 R3 blocker 6: resolve once up-front so every later
960
961
  # callsite (entity_id resolver, delete call, response) uses the
961
962
  # storage key consistently — outer ``scene_id`` matches the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ha-mcp-dev
3
- Version: 7.5.0.dev528
3
+ Version: 7.5.0.dev530
4
4
  Summary: Home Assistant MCP Server - Complete control of Home Assistant through MCP
5
5
  Author-email: Julien <github@qc-h.net>
6
6
  License: MIT