Skip to content

Commit 9e572b2

Browse files
committed
fix: pass verify_ssl to direct-Supervisor httpx client
Per Gemini review on PR homeassistant-ai#1126: mirrors the verify=self.verify_ssl pattern from rest_client.py:125 (class-level httpx_client). The http://supervisor URL is plain HTTP and TLS-irrelevant in practice, but the parameter keeps the constructor consistent with the established HomeAssistantClient shape. mock_client fixture extended with verify_ssl = True so the existing Supervisor-direct tests exercise the new attribute access path.
1 parent 93549d1 commit 9e572b2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/ha_mcp/client/rest_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ async def _get_addon_logs_via_supervisor(self, slug: str) -> str:
484484

485485
try:
486486
async with httpx.AsyncClient(
487-
timeout=httpx.Timeout(self.timeout)
487+
timeout=httpx.Timeout(self.timeout),
488+
verify=self.verify_ssl,
488489
) as client:
489490
response = await client.get(
490491
url,

tests/src/unit/test_tools_utility_supervisor_logs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def mock_client():
3939
client.base_url = "http://test.local:8123"
4040
client.token = "test-token"
4141
client.timeout = 30
42+
client.verify_ssl = True
4243
client.httpx_client = MagicMock()
4344
return client
4445

0 commit comments

Comments
 (0)