Skip to content

Commit cb09011

Browse files
kingpanther13claude
andcommitted
chore: reset addon-repo to upstream master + PR homeassistant-ai#960 only, dev79
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 157db90 commit cb09011

98 files changed

Lines changed: 39120 additions & 5 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"

homeassistant-addon-dev/config.yaml

Lines changed: 3 additions & 4 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: "7.2.0.dev212"
3+
version: "dev79"
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,7 +14,6 @@ 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
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
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.7",
34+
]
35+
36+
[project.urls]
37+
"Homepage" = "https://github.com/homeassistant-ai/ha-mcp"
38+
"Bug Tracker" = "https://github.com/homeassistant-ai/ha-mcp/issues"
39+
"Repository" = "https://github.com/homeassistant-ai/ha-mcp"
40+
41+
[project.scripts]
42+
ha-mcp = "ha_mcp.__main__:main"
43+
ha-mcp-smoke-test = "ha_mcp.smoke_test:main"
44+
hamcp-test-env = "tests.test_env_manager:main"
45+
ha-mcp-web = "ha_mcp.__main__:main_web"
46+
ha-mcp-sse = "ha_mcp.__main__:main_sse"
47+
ha-mcp-oauth = "ha_mcp.__main__:main_oauth"
48+
49+
[tool.setuptools]
50+
package-dir = {"" = "src", "tests" = "tests"}
51+
packages = { find = { where = ["src", "."], include = ["ha_mcp*", "tests"] } }
52+
53+
[tool.setuptools.package-data]
54+
ha_mcp = ["py.typed", "_pypi_marker", "resources/skills-vendor/**/*"]
55+
56+
[tool.mypy]
57+
python_version = "3.13"
58+
mypy_path = "src"
59+
# /tmp keeps the cache on Linux tmpfs — avoids the slow Windows FS in WSL2.
60+
# Windows-native contributors can remove this line or override with MYPY_CACHE_DIR.
61+
cache_dir = "/tmp/.mypy_cache"
62+
warn_return_any = true
63+
warn_unused_configs = true
64+
disallow_untyped_defs = true
65+
disallow_incomplete_defs = true
66+
check_untyped_defs = true
67+
no_implicit_optional = true
68+
warn_redundant_casts = true
69+
warn_unused_ignores = true
70+
show_error_codes = true
71+
namespace_packages = true
72+
explicit_package_bases = true
73+
74+
[[tool.mypy.overrides]]
75+
module = [
76+
"fastmcp.*",
77+
"jq",
78+
]
79+
ignore_missing_imports = true
80+
81+
[[tool.mypy.overrides]]
82+
module = [
83+
"homeassistant.*",
84+
"aiohttp",
85+
"voluptuous",
86+
"jsonschema",
87+
]
88+
ignore_missing_imports = true
89+
90+
91+
[tool.ruff]
92+
target-version = "py313"
93+
line-length = 88
94+
extend-exclude = ["tests/initial_test_state"]
95+
96+
[tool.ruff.lint]
97+
select = [
98+
"E", # pycodestyle errors
99+
"W", # pycodestyle warnings
100+
"F", # pyflakes
101+
"I", # isort
102+
"B", # flake8-bugbear
103+
"C4", # flake8-comprehensions
104+
"UP", # pyupgrade
105+
"RUF", # ruff-specific rules
106+
"PIE", # misc lints
107+
"PERF", # performance anti-patterns
108+
"ASYNC", # async best practices
109+
"A", # builtin shadowing
110+
"LOG", # logging best practices
111+
"SIM", # simplify
112+
]
113+
ignore = [
114+
"E501", # line too long — formatter handles this
115+
"B008", # function calls in defaults — FastMCP pattern
116+
"SIM102", # collapsible-if — sometimes less readable
117+
"SIM108", # ternary — sometimes less readable
118+
"SIM105", # contextlib.suppress — style preference
119+
"ASYNC109",# timeout params are standard in HA API patterns
120+
"RUF001", # ambiguous unicode — HA entity names use degree symbols etc
121+
"RUF003", # ambiguous unicode in comments
122+
"RUF010", # explicit f-string type conversion — str(x) is clearer than !s
123+
"F841", # unused variable — too many to fix now
124+
"RUF059", # unused unpacked variable
125+
"SIM118", # in-dict-keys — style preference
126+
"PIE810", # multiple-starts-ends-with — style preference
127+
"RUF005", # collection-literal-concatenation
128+
"RUF022", # unsorted-dunder-all
129+
"RUF013", # implicit-optional
130+
]
131+
132+
[tool.ruff.lint.per-file-ignores]
133+
"__init__.py" = ["F401"]
134+
"tests/**/*" = ["E501", "B011"]
135+
# C901 ignores for tools files with complex methods (see #925).
136+
# Remove lines as individual methods are simplified below threshold.
137+
"src/ha_mcp/tools/backup.py" = ["C901"]
138+
"src/ha_mcp/tools/best_practice_checker.py" = ["C901"]
139+
"src/ha_mcp/tools/device_control.py" = ["C901"]
140+
"src/ha_mcp/tools/helpers.py" = ["C901"]
141+
"src/ha_mcp/tools/registry.py" = ["C901"]
142+
"src/ha_mcp/tools/smart_search.py" = ["C901"]
143+
"src/ha_mcp/tools/tools_addons.py" = ["C901"]
144+
"src/ha_mcp/tools/tools_config_dashboards.py" = ["C901"]
145+
"src/ha_mcp/tools/tools_config_helpers.py" = ["C901"]
146+
"src/ha_mcp/tools/tools_entities.py" = ["C901"]
147+
"src/ha_mcp/tools/tools_registry.py" = ["C901"]
148+
"src/ha_mcp/tools/tools_search.py" = ["C901"]
149+
"src/ha_mcp/tools/tools_utility.py" = ["C901"]
150+
"src/ha_mcp/tools/util_helpers.py" = ["C901"]
151+
152+
[tool.pytest.ini_options]
153+
testpaths = ["tests"]
154+
python_files = ["test_*.py", "*_test.py"]
155+
python_classes = ["Test*"]
156+
python_functions = ["test_*"]
157+
addopts = [
158+
"--strict-markers",
159+
"--strict-config",
160+
"--verbose",
161+
"--tb=short",
162+
]
163+
markers = [
164+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
165+
"integration: marks tests as integration tests",
166+
"unit: marks tests as unit tests",
167+
"automation: automation lifecycle tests",
168+
"calendar: calendar event management tests",
169+
"device: device control tests",
170+
"script: script orchestration tests",
171+
"helper: helper integration tests",
172+
"convenience: convenience tools tests (scene, weather, energy, docs)",
173+
"error_handling: error handling and edge case tests",
174+
"cleanup: tests that create entities needing cleanup",
175+
"performance: performance measurement and regression tests",
176+
]
177+
asyncio_mode = "auto"
178+
179+
[dependency-groups]
180+
dev = [
181+
"build>=1.2.2",
182+
"docker>=7.1.0",
183+
"mypy>=1.17.0",
184+
"openai>=1.0.0",
185+
"psutil>=7.0.0",
186+
"pytest>=8.4.2",
187+
"pytest-asyncio>=1.1.0",
188+
"pytest-cov>=5.0.0",
189+
"pytest-xdist>=3.8.0",
190+
"requests>=2.25.0",
191+
"lefthook>=1.10.0",
192+
"ruamel.yaml>=0.18.0",
193+
"ruff>=0.12.12",
194+
"testcontainers>=4.13.0",
195+
"ast-grep-cli>=0.42.0",
196+
]
197+
198+
# Semantic versioning configuration
199+
[tool.semantic_release]
200+
version_toml = ["pyproject.toml:project.version"]
201+
version_variables = [
202+
"src/ha_mcp/__init__.py:__version__",
203+
]
204+
build_command = """
205+
pip install uv && uv lock
206+
git add uv.lock
207+
"""
208+
dist_path = "dist/"
209+
upload_to_PyPI = true
210+
upload_to_release = true
211+
remove_dist = false
212+
213+
# Commit message parsing
214+
commit_parser = "angular"
215+
commit_parser_options = { major_tags = ["BREAKING", "!"], minor_tags = ["feat"], patch_tags = ["fix", "perf", "refactor"] }
216+
217+
# Changelog configuration
218+
[tool.semantic_release.changelog]
219+
template_dir = "templates"
220+
exclude_commit_patterns = [
221+
"^.*\\(site\\).*$", # Commits with (site) scope
222+
'''chore\(addon\): [Ss]ync changelog.*''', # Changelog sync commits
223+
]
224+
225+
[tool.semantic_release.changelog.default_templates]
226+
changelog_file = "CHANGELOG.md"
227+
228+
# Version scheme
229+
major_on_zero = true
230+
allow_zero_version = false
231+
232+
# Branch and tag configuration
233+
branch = "master"
234+
235+
# Publish configuration (v10 syntax)
236+
[tool.semantic_release.publish]
237+
# GitHub release is created by build-binary.yml workflow to include binaries
238+
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)