mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add Conversation command to timers (#118325)
* Add Assist command to timers * Rename to conversation_command. Execute in timer code. * Make agent_id optional * Fix arg --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -104,6 +104,7 @@ async def async_handle(
|
||||
language: str | None = None,
|
||||
assistant: str | None = None,
|
||||
device_id: str | None = None,
|
||||
conversation_agent_id: str | None = None,
|
||||
) -> IntentResponse:
|
||||
"""Handle an intent."""
|
||||
handler = hass.data.get(DATA_KEY, {}).get(intent_type)
|
||||
@@ -127,6 +128,7 @@ async def async_handle(
|
||||
language=language,
|
||||
assistant=assistant,
|
||||
device_id=device_id,
|
||||
conversation_agent_id=conversation_agent_id,
|
||||
)
|
||||
|
||||
try:
|
||||
@@ -1156,6 +1158,7 @@ class Intent:
|
||||
"category",
|
||||
"assistant",
|
||||
"device_id",
|
||||
"conversation_agent_id",
|
||||
]
|
||||
|
||||
def __init__(
|
||||
@@ -1170,6 +1173,7 @@ class Intent:
|
||||
category: IntentCategory | None = None,
|
||||
assistant: str | None = None,
|
||||
device_id: str | None = None,
|
||||
conversation_agent_id: str | None = None,
|
||||
) -> None:
|
||||
"""Initialize an intent."""
|
||||
self.hass = hass
|
||||
@@ -1182,6 +1186,7 @@ class Intent:
|
||||
self.category = category
|
||||
self.assistant = assistant
|
||||
self.device_id = device_id
|
||||
self.conversation_agent_id = conversation_agent_id
|
||||
|
||||
@callback
|
||||
def create_response(self) -> IntentResponse:
|
||||
|
||||
Reference in New Issue
Block a user