Skip to content

Commit d9cbc43

Browse files
kingpanther13claude
andcommitted
chore: reset addon-repo to upstream master + PRs homeassistant-ai#854, homeassistant-ai#857, dev66
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6eb8533 commit d9cbc43

98 files changed

Lines changed: 37852 additions & 11 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

homeassistant-addon-dev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ WORKDIR /app
2828

2929
# Copy the virtual environment and startup script from builder
3030
COPY --from=builder /app/.venv /app/.venv
31-
COPY homeassistant-addon/start.py /
31+
COPY start.py /
3232

3333
# Activate virtual environment via PATH
3434
ENV PATH="/app/.venv/bin:$PATH"
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: "Home Assistant MCP Server (Dev)"
1+
name: "Fork-Dev"
22
description: "Development channel - AI assistant integration via MCP (unstable)"
3-
version: "dev"
3+
version: "dev66"
44
slug: "ha_mcp_dev"
5-
url: "https://github.com/homeassistant-ai/ha-mcp"
5+
url: "https://github.com/kingpanther13/ha-mcp-fork"
66
stage: experimental
77
arch:
88
- aarch64
@@ -14,33 +14,26 @@ hassio_api: true
1414
hassio_role: default
1515
homeassistant_api: true
1616
host_network: true
17-
image: "ghcr.io/homeassistant-ai/ha-mcp-addon-dev-{arch}"
1817
options:
1918
backup_hint: "normal"
2019
enable_skills: true
2120
enable_skills_as_tools: false
2221
enable_tool_search: false
23-
<<<<<<< HEAD
2422
enable_yaml_config_editing: false
2523
enable_code_mode: false
26-
=======
2724
disabled_tools: "ha_config_set_yaml"
2825
pinned_tools: ""
2926
tool_search_max_results: 5
30-
>>>>>>> pr-857
3127
schema:
3228
backup_hint: list(strong|normal|weak|auto)
3329
secret_path: str?
3430
enable_skills: bool?
3531
enable_skills_as_tools: bool?
3632
enable_tool_search: bool?
37-
<<<<<<< HEAD
3833
enable_yaml_config_editing: bool?
3934
enable_code_mode: bool?
40-
=======
4135
disabled_tools: str?
4236
pinned_tools: str?
4337
tool_search_max_results: int?
44-
>>>>>>> pr-857
4538
ports:
4639
9583/tcp: 9583
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ha-mcp"
7+
version = "7.2.0"
8+
description = "Home Assistant MCP Server - Complete control of Home Assistant through MCP"
9+
readme = "README.md"
10+
requires-python = ">=3.13,<3.14"
11+
license = {text = "MIT"}
12+
authors = [
13+
{name = "Julien", email = "github@qc-h.net"}
14+
]
15+
keywords = ["mcp", "home-assistant", "ai", "automation", "smart-home"]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"License :: OSI Approved :: MIT License",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.13",
22+
"Topic :: Home Automation",
23+
"Topic :: Software Development :: Libraries :: Python Modules",
24+
]
25+
26+
dependencies = [
27+
"fastmcp==3.2.0",
28+
"httpx[socks]==0.28.1",
29+
"pydantic==2.12.5",
30+
"python-dotenv==1.2.2",
31+
"truststore==0.10.4",
32+
"websockets==16.0",
33+
"cryptography==46.0.6",
34+
"pydantic-monty==0.0.9",
35+
]
36+
37+
[project.urls]
38+
"Homepage" = "https://github.com/homeassistant-ai/ha-mcp"
39+
"Bug Tracker" = "https://github.com/homeassistant-ai/ha-mcp/issues"
40+
"Repository" = "https://github.com/homeassistant-ai/ha-mcp"
41+
42+
[project.scripts]
43+
ha-mcp = "ha_mcp.__main__:main"
44+
ha-mcp-smoke-test = "ha_mcp.smoke_test:main"
45+
hamcp-test-env = "tests.test_env_manager:main"
46+
ha-mcp-web = "ha_mcp.__main__:main_web"
47+
ha-mcp-sse = "ha_mcp.__main__:main_sse"
48+
ha-mcp-oauth = "ha_mcp.__main__:main_oauth"
49+
50+
[tool.setuptools]
51+
package-dir = {"" = "src", "tests" = "tests"}
52+
packages = { find = { where = ["src", "."], include = ["ha_mcp*", "tests"] } }
53+
54+
[tool.setuptools.package-data]
55+
ha_mcp = ["py.typed", "_pypi_marker", "resources/skills-vendor/**/*"]
56+
57+
[tool.mypy]
58+
python_version = "3.13"
59+
mypy_path = "src"
60+
# /tmp keeps the cache on Linux tmpfs — avoids the slow Windows FS in WSL2.
61+
# Windows-native contributors can remove this line or override with MYPY_CACHE_DIR.
62+
cache_dir = "/tmp/.mypy_cache"
63+
warn_return_any = true
64+
warn_unused_configs = true
65+
disallow_untyped_defs = true
66+
disallow_incomplete_defs = true
67+
check_untyped_defs = true
68+
no_implicit_optional = true
69+
warn_redundant_casts = true
70+
warn_unused_ignores = true
71+
show_error_codes = true
72+
namespace_packages = true
73+
explicit_package_bases = true
74+
75+
[[tool.mypy.overrides]]
76+
module = [
77+
"fastmcp.*",
78+
"jq",
79+
"pydantic_monty",
80+
"pydantic_monty.*",
81+
]
82+
ignore_missing_imports = true
83+
84+
[[tool.mypy.overrides]]
85+
module = [
86+
"homeassistant.*",
87+
"aiohttp",
88+
"voluptuous",
89+
"jsonschema",
90+
]
91+
ignore_missing_imports = true
92+
93+
94+
[tool.ruff]
95+
target-version = "py313"
96+
line-length = 88
97+
extend-exclude = ["tests/initial_test_state"]
98+
99+
[tool.ruff.lint]
100+
select = [
101+
"E", # pycodestyle errors
102+
"W", # pycodestyle warnings
103+
"F", # pyflakes
104+
"I", # isort
105+
"B", # flake8-bugbear
106+
"C4", # flake8-comprehensions
107+
"UP", # pyupgrade
108+
"RUF", # ruff-specific rules
109+
"PIE", # misc lints
110+
"PERF", # performance anti-patterns
111+
"ASYNC", # async best practices
112+
"A", # builtin shadowing
113+
"LOG", # logging best practices
114+
"SIM", # simplify
115+
]
116+
ignore = [
117+
"E501", # line too long — formatter handles this
118+
"B008", # function calls in defaults — FastMCP pattern
119+
"C901", # complexity — too many to fix now
120+
"SIM102", # collapsible-if — sometimes less readable
121+
"SIM108", # ternary — sometimes less readable
122+
"SIM105", # contextlib.suppress — style preference
123+
"ASYNC109",# timeout params are standard in HA API patterns
124+
"RUF001", # ambiguous unicode — HA entity names use degree symbols etc
125+
"RUF003", # ambiguous unicode in comments
126+
"RUF010", # explicit f-string type conversion — str(x) is clearer than !s
127+
"F841", # unused variable — too many to fix now
128+
"RUF059", # unused unpacked variable
129+
"SIM118", # in-dict-keys — style preference
130+
"PIE810", # multiple-starts-ends-with — style preference
131+
"RUF005", # collection-literal-concatenation
132+
"RUF022", # unsorted-dunder-all
133+
"RUF013", # implicit-optional
134+
]
135+
136+
[tool.ruff.lint.per-file-ignores]
137+
"__init__.py" = ["F401"]
138+
"tests/**/*" = ["E501", "B011"]
139+
140+
[tool.pytest.ini_options]
141+
testpaths = ["tests"]
142+
python_files = ["test_*.py", "*_test.py"]
143+
python_classes = ["Test*"]
144+
python_functions = ["test_*"]
145+
addopts = [
146+
"--strict-markers",
147+
"--strict-config",
148+
"--verbose",
149+
"--tb=short",
150+
]
151+
markers = [
152+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
153+
"integration: marks tests as integration tests",
154+
"unit: marks tests as unit tests",
155+
"automation: automation lifecycle tests",
156+
"calendar: calendar event management tests",
157+
"device: device control tests",
158+
"script: script orchestration tests",
159+
"helper: helper integration tests",
160+
"convenience: convenience tools tests (scene, weather, energy, docs)",
161+
"error_handling: error handling and edge case tests",
162+
"cleanup: tests that create entities needing cleanup",
163+
"performance: performance measurement and regression tests",
164+
]
165+
asyncio_mode = "auto"
166+
167+
[dependency-groups]
168+
dev = [
169+
"build>=1.2.2",
170+
"docker>=7.1.0",
171+
"mypy>=1.17.0",
172+
"openai>=1.0.0",
173+
"psutil>=7.0.0",
174+
"pytest>=8.4.2",
175+
"pytest-asyncio>=1.1.0",
176+
"pytest-cov>=5.0.0",
177+
"pytest-xdist>=3.8.0",
178+
"requests>=2.25.0",
179+
"lefthook>=1.10.0",
180+
"ruff>=0.12.12",
181+
"testcontainers>=4.13.0",
182+
"ast-grep-cli>=0.42.0",
183+
]
184+
185+
# Semantic versioning configuration
186+
[tool.semantic_release]
187+
version_toml = ["pyproject.toml:project.version"]
188+
version_variables = [
189+
"src/ha_mcp/__init__.py:__version__",
190+
]
191+
build_command = """
192+
pip install uv && uv lock
193+
git add uv.lock
194+
"""
195+
dist_path = "dist/"
196+
upload_to_PyPI = true
197+
upload_to_release = true
198+
remove_dist = false
199+
200+
# Commit message parsing
201+
commit_parser = "angular"
202+
commit_parser_options = { major_tags = ["BREAKING", "!"], minor_tags = ["feat"], patch_tags = ["fix", "perf", "refactor"] }
203+
204+
# Changelog configuration
205+
[tool.semantic_release.changelog]
206+
template_dir = "templates"
207+
exclude_commit_patterns = [
208+
"^.*\\(site\\).*$", # Commits with (site) scope
209+
'''chore\(addon\): [Ss]ync changelog.*''', # Changelog sync commits
210+
]
211+
212+
[tool.semantic_release.changelog.default_templates]
213+
changelog_file = "CHANGELOG.md"
214+
215+
# Version scheme
216+
major_on_zero = true
217+
allow_zero_version = false
218+
219+
# Branch and tag configuration
220+
branch = "master"
221+
222+
# Publish configuration (v10 syntax)
223+
[tool.semantic_release.publish]
224+
# GitHub release is created by build-binary.yml workflow to include binaries
225+
upload_to_vcs_release = false
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
"""
2+
Home Assistant MCP Server
3+
4+
A Model Context Protocol server that provides complete control over Home Assistant
5+
through REST API and WebSocket integration with 20+ enhanced tools.
6+
"""
7+
8+
__version__ = "7.2.0"
9+
__author__ = "Julien"
10+
__license__ = "MIT"
11+
12+
from .auth import HomeAssistantOAuthProvider
13+
from .client.rest_client import HomeAssistantClient
14+
from .config import Settings
15+
from .errors import (
16+
ErrorCode,
17+
create_auth_error,
18+
create_config_error,
19+
create_connection_error,
20+
create_entity_not_found_error,
21+
create_error_response,
22+
create_resource_not_found_error,
23+
create_service_error,
24+
create_timeout_error,
25+
create_validation_error,
26+
get_error_code,
27+
get_error_message,
28+
is_error_response,
29+
)
30+
from .server import HomeAssistantSmartMCPServer
31+
32+
__all__ = [
33+
"Settings",
34+
"HomeAssistantClient",
35+
"HomeAssistantSmartMCPServer",
36+
"HomeAssistantOAuthProvider",
37+
# Error handling exports
38+
"ErrorCode",
39+
"create_error_response",
40+
"create_connection_error",
41+
"create_auth_error",
42+
"create_entity_not_found_error",
43+
"create_service_error",
44+
"create_validation_error",
45+
"create_config_error",
46+
"create_timeout_error",
47+
"create_resource_not_found_error",
48+
"is_error_response",
49+
"get_error_code",
50+
"get_error_message",
51+
]

0 commit comments

Comments
 (0)