mirror of
https://github.com/home-assistant/core.git
synced 2025-11-05 00:49:37 +00:00
42 lines
951 B
Python
42 lines
951 B
Python
"""Const for conversation integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from enum import IntFlag, StrEnum
|
|
from typing import TYPE_CHECKING
|
|
|
|
from homeassistant.util.hass_dict import HassKey
|
|
|
|
if TYPE_CHECKING:
|
|
from homeassistant.helpers.entity_component import EntityComponent
|
|
|
|
from .entity import ConversationEntity
|
|
|
|
DOMAIN = "conversation"
|
|
HOME_ASSISTANT_AGENT = "conversation.home_assistant"
|
|
|
|
ATTR_TEXT = "text"
|
|
ATTR_LANGUAGE = "language"
|
|
ATTR_AGENT_ID = "agent_id"
|
|
ATTR_CONVERSATION_ID = "conversation_id"
|
|
|
|
SERVICE_PROCESS = "process"
|
|
SERVICE_RELOAD = "reload"
|
|
|
|
DATA_COMPONENT: HassKey[EntityComponent[ConversationEntity]] = HassKey(DOMAIN)
|
|
|
|
|
|
class ConversationEntityFeature(IntFlag):
|
|
"""Supported features of the conversation entity."""
|
|
|
|
CONTROL = 1
|
|
|
|
|
|
class ChatLogEventType(StrEnum):
|
|
"""Chat log event type."""
|
|
|
|
CREATED = "created"
|
|
UPDATED = "updated"
|
|
DELETED = "deleted"
|
|
CONTENT_ADDED = "content_added"
|