intent recognition fix for assist pipeline
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
All notable changes to the OpenClaw Home Assistant Integration will be documented in this file.
|
All notable changes to the OpenClaw Home Assistant Integration will be documented in this file.
|
||||||
|
|
||||||
|
## [0.1.31] - 2026-02-20
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed Assist pipeline crash during intent recognition on some Home Assistant versions:
|
||||||
|
- Replaced `conversation.IntentResponse` / `conversation.IntentResponseErrorCode` usage with `homeassistant.helpers.intent` equivalents in the OpenClaw conversation agent.
|
||||||
|
- Resolves `AttributeError: module 'homeassistant.components.conversation' has no attribute 'IntentResponse'`.
|
||||||
|
|
||||||
## [0.1.30] - 2026-02-20
|
## [0.1.30] - 2026-02-20
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from homeassistant.components import conversation
|
|||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
from homeassistant.helpers import intent
|
||||||
|
|
||||||
from .api import OpenClawApiClient, OpenClawApiError
|
from .api import OpenClawApiClient, OpenClawApiError
|
||||||
from .const import (
|
from .const import (
|
||||||
@@ -180,7 +181,7 @@ class OpenClawConversationAgent(conversation.AbstractConversationAgent):
|
|||||||
)
|
)
|
||||||
coordinator.update_last_activity()
|
coordinator.update_last_activity()
|
||||||
|
|
||||||
intent_response = conversation.IntentResponse(language=user_input.language)
|
intent_response = intent.IntentResponse(language=user_input.language)
|
||||||
intent_response.async_set_speech(full_response)
|
intent_response.async_set_speech(full_response)
|
||||||
|
|
||||||
return conversation.ConversationResult(
|
return conversation.ConversationResult(
|
||||||
@@ -269,9 +270,9 @@ class OpenClawConversationAgent(conversation.AbstractConversationAgent):
|
|||||||
error_message: str,
|
error_message: str,
|
||||||
) -> conversation.ConversationResult:
|
) -> conversation.ConversationResult:
|
||||||
"""Build an error ConversationResult."""
|
"""Build an error ConversationResult."""
|
||||||
intent_response = conversation.IntentResponse(language=user_input.language)
|
intent_response = intent.IntentResponse(language=user_input.language)
|
||||||
intent_response.async_set_error(
|
intent_response.async_set_error(
|
||||||
conversation.IntentResponseErrorCode.UNKNOWN,
|
intent.IntentResponseErrorCode.UNKNOWN,
|
||||||
error_message,
|
error_message,
|
||||||
)
|
)
|
||||||
return conversation.ConversationResult(
|
return conversation.ConversationResult(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
|
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"version": "0.1.30",
|
"version": "0.1.31",
|
||||||
"dependencies": ["conversation"],
|
"dependencies": ["conversation"],
|
||||||
"after_dependencies": ["hassio", "lovelace"]
|
"after_dependencies": ["hassio", "lovelace"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user