Files
core/homeassistant/components/ai_task/const.py
Paulus Schoutsen 9bd7ea78f0 Remove AITaskEntityFeature.GENERATE_STRUCTURED_DATA feature flag
The structured data generation functionality is now available to all
entities that support GENERATE_DATA. This simplifies the API by removing
an unnecessary feature flag while maintaining all functionality.

- Remove GENERATE_STRUCTURED_DATA from AITaskEntityFeature enum
- Remove feature check in task.py
- Update services.yaml to remove filter
- Update tests to reflect the change

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 13:22:48 +02:00

37 lines
984 B
Python

"""Constants for the AI Task integration."""
from __future__ import annotations
from enum import IntFlag
from typing import TYPE_CHECKING, Final
from homeassistant.util.hass_dict import HassKey
if TYPE_CHECKING:
from homeassistant.helpers.entity_component import EntityComponent
from . import AITaskPreferences
from .entity import AITaskEntity
DOMAIN = "ai_task"
DATA_COMPONENT: HassKey[EntityComponent[AITaskEntity]] = HassKey(DOMAIN)
DATA_PREFERENCES: HassKey[AITaskPreferences] = HassKey(f"{DOMAIN}_preferences")
SERVICE_GENERATE_DATA = "generate_data"
ATTR_INSTRUCTIONS: Final = "instructions"
ATTR_TASK_NAME: Final = "task_name"
ATTR_STRUCTURE: Final = "structure"
ATTR_REQUIRED: Final = "required"
DEFAULT_SYSTEM_PROMPT = (
"You are a Home Assistant expert and help users with their tasks."
)
class AITaskEntityFeature(IntFlag):
"""Supported features of the AI task entity."""
GENERATE_DATA = 1
"""Generate data based on instructions."""