From acc75e4419207893e88aff6d36568a6c393fdcea Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 8 Sep 2025 18:01:41 +0200 Subject: [PATCH] Remove image filename parameter from Google Generative AI (#151914) --- .../__init__.py | 18 +----------------- .../services.yaml | 4 ---- .../strings.json | 11 ----------- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/homeassistant/components/google_generative_ai_conversation/__init__.py b/homeassistant/components/google_generative_ai_conversation/__init__.py index 8d7fb1b1cc4c..86966937057f 100644 --- a/homeassistant/components/google_generative_ai_conversation/__init__.py +++ b/homeassistant/components/google_generative_ai_conversation/__init__.py @@ -30,7 +30,6 @@ from homeassistant.helpers import ( device_registry as dr, entity_registry as er, ) -from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.helpers.typing import ConfigType from .const import ( @@ -72,18 +71,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def generate_content(call: ServiceCall) -> ServiceResponse: """Generate content from text and optionally images.""" - if call.data[CONF_IMAGE_FILENAME]: - # Deprecated in 2025.3, to remove in 2025.9 - async_create_issue( - hass, - DOMAIN, - "deprecated_image_filename_parameter", - breaks_in_ha_version="2025.9.0", - is_fixable=False, - severity=IssueSeverity.WARNING, - translation_key="deprecated_image_filename_parameter", - ) - prompt_parts = [call.data[CONF_PROMPT]] config_entry: GoogleGenerativeAIConfigEntry = ( @@ -92,7 +79,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: client = config_entry.runtime_data - files = call.data[CONF_IMAGE_FILENAME] + call.data[CONF_FILENAMES] + files = call.data[CONF_FILENAMES] if files: for filename in files: @@ -140,9 +127,6 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: schema=vol.Schema( { vol.Required(CONF_PROMPT): cv.string, - vol.Optional(CONF_IMAGE_FILENAME, default=[]): vol.All( - cv.ensure_list, [cv.string] - ), vol.Optional(CONF_FILENAMES, default=[]): vol.All( cv.ensure_list, [cv.string] ), diff --git a/homeassistant/components/google_generative_ai_conversation/services.yaml b/homeassistant/components/google_generative_ai_conversation/services.yaml index 82190d645400..30077dec6507 100644 --- a/homeassistant/components/google_generative_ai_conversation/services.yaml +++ b/homeassistant/components/google_generative_ai_conversation/services.yaml @@ -5,10 +5,6 @@ generate_content: selector: text: multiline: true - image_filename: - required: false - selector: - object: filenames: required: false selector: diff --git a/homeassistant/components/google_generative_ai_conversation/strings.json b/homeassistant/components/google_generative_ai_conversation/strings.json index 545436da5903..43008332e687 100644 --- a/homeassistant/components/google_generative_ai_conversation/strings.json +++ b/homeassistant/components/google_generative_ai_conversation/strings.json @@ -160,11 +160,6 @@ "description": "The prompt", "example": "Describe what you see in these images" }, - "image_filename": { - "name": "Image filename", - "description": "Deprecated. Use filenames instead.", - "example": "/config/www/image.jpg" - }, "filenames": { "name": "Attachment filenames", "description": "Attachments to add to the prompt (images, PDFs, etc)", @@ -172,11 +167,5 @@ } } } - }, - "issues": { - "deprecated_image_filename_parameter": { - "title": "Deprecated 'image_filename' parameter", - "description": "The 'image_filename' parameter in Google Generative AI actions is deprecated. Please edit scripts and automations to use 'filenames' instead." - } } }