fix: Address code review findings for v2.4.0

- Fix 404 accepted as valid API response in config_flow validation (both ConfigFlow and OptionsFlow)
- Sanitize catch-all exception in config_flow (str(e) → "unknown" error key)
- Add exception chaining (from err) to ConfigEntryNotReady raise
- Replace datetime.now() with dt_util.utcnow() for HA timezone convention
- Add defensive raise after retry loop in api_client._make_request
- Remove unused CONF_API_KEY/CONF_NAME imports from const.py
- Restore google-genai dependency in manifest (required for Gemini provider)
This commit is contained in:
SMKRV
2026-03-12 01:26:31 +03:00
parent 998103ce73
commit 63c5c7c51e
5 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Constants for the HA text AI integration.
import os
import json
from typing import Final
from homeassistant.const import Platform, CONF_API_KEY, CONF_NAME
from homeassistant.const import Platform
import logging
_LOGGER = logging.getLogger(__name__)