From 661b14dec57987f4fc34b54c1a92df82ee93757c Mon Sep 17 00:00:00 2001 From: Denis Shulyaka Date: Thu, 12 Feb 2026 01:17:15 +0300 Subject: [PATCH] Deprecate OpenAI actions (#162211) --- .../openai_conversation/__init__.py | 33 +++++++++++++++++++ .../openai_conversation/strings.json | 16 ++++++--- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/openai_conversation/__init__.py b/homeassistant/components/openai_conversation/__init__.py index b031f91c7fa..fb13a38f824 100644 --- a/homeassistant/components/openai_conversation/__init__.py +++ b/homeassistant/components/openai_conversation/__init__.py @@ -34,6 +34,7 @@ from homeassistant.helpers import ( config_validation as cv, device_registry as dr, entity_registry as er, + issue_registry as ir, selector, ) from homeassistant.helpers.httpx_client import get_async_client @@ -77,6 +78,22 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def render_image(call: ServiceCall) -> ServiceResponse: """Render an image with dall-e.""" + LOGGER.warning( + "Action '%s.%s' is deprecated and will be removed in the 2026.9.0 release. " + "Please use the 'ai_task.generate_image' action instead", + DOMAIN, + SERVICE_GENERATE_IMAGE, + ) + ir.async_create_issue( + hass, + DOMAIN, + "deprecated_generate_image", + breaks_in_ha_version="2026.9.0", + is_fixable=False, + severity=ir.IssueSeverity.WARNING, + translation_key="deprecated_generate_image", + ) + entry_id = call.data["config_entry"] entry = hass.config_entries.async_get_entry(entry_id) @@ -112,6 +129,22 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: async def send_prompt(call: ServiceCall) -> ServiceResponse: """Send a prompt to ChatGPT and return the response.""" + LOGGER.warning( + "Action '%s.%s' is deprecated and will be removed in the 2026.9.0 release. " + "Please use the 'ai_task.generate_data' action instead", + DOMAIN, + SERVICE_GENERATE_CONTENT, + ) + ir.async_create_issue( + hass, + DOMAIN, + "deprecated_generate_content", + breaks_in_ha_version="2026.9.0", + is_fixable=False, + severity=ir.IssueSeverity.WARNING, + translation_key="deprecated_generate_content", + ) + entry_id = call.data["config_entry"] entry = hass.config_entries.async_get_entry(entry_id) diff --git a/homeassistant/components/openai_conversation/strings.json b/homeassistant/components/openai_conversation/strings.json index b03ac8b6395..12719678f2d 100644 --- a/homeassistant/components/openai_conversation/strings.json +++ b/homeassistant/components/openai_conversation/strings.json @@ -177,6 +177,14 @@ } }, "issues": { + "deprecated_generate_content": { + "description": "Action 'openai_conversation.generate_content' is deprecated and will be removed in the 2026.9.0 release. Please use the 'ai_task.generate_data' action instead", + "title": "Deprecated 'generate_content' action" + }, + "deprecated_generate_image": { + "description": "Action 'openai_conversation.generate_image' is deprecated and will be removed in the 2026.9.0 release. Please use the 'ai_task.generate_image' action instead", + "title": "Deprecated 'generate_image' action" + }, "organization_verification_required": { "description": "Your organization must be verified to use this model. Please go to {platform_settings} and select Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.", "title": "Organization verification required" @@ -218,7 +226,7 @@ }, "services": { "generate_content": { - "description": "Sends a conversational query to ChatGPT including any attached image or PDF files", + "description": "Sends a conversational query to ChatGPT including any attached image or PDF files (deprecated)", "fields": { "config_entry": { "description": "The config entry to use for this action", @@ -233,10 +241,10 @@ "name": "Prompt" } }, - "name": "Generate content" + "name": "Generate content (deprecated)" }, "generate_image": { - "description": "Turns a prompt into an image", + "description": "Turns a prompt into an image (deprecated)", "fields": { "config_entry": { "description": "The config entry to use for this action", @@ -260,7 +268,7 @@ "name": "Style" } }, - "name": "Generate image" + "name": "Generate image (deprecated)" } } }