fixing messages in stt mode
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
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.35] - 2026-02-20
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Improved chat-card reliability when using voice send flow by re-subscribing to `openclaw_message_received` after card reconnects.
|
||||||
|
- Added backend history-sync fallback after message send so user/assistant messages still appear when an event is missed.
|
||||||
|
|
||||||
## [0.1.34] - 2026-02-20
|
## [0.1.34] - 2026-02-20
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ _CARD_PATH = Path(__file__).parent / "www" / _CARD_FILENAME
|
|||||||
# URL at which the card JS is served (registered via register_static_path)
|
# URL at which the card JS is served (registered via register_static_path)
|
||||||
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
|
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
|
||||||
# Versioned URL used for Lovelace resource registration to avoid stale browser cache
|
# Versioned URL used for Lovelace resource registration to avoid stale browser cache
|
||||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.34"
|
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.35"
|
||||||
|
|
||||||
OpenClawConfigEntry = ConfigEntry
|
OpenClawConfigEntry = ConfigEntry
|
||||||
|
|
||||||
|
|||||||
@@ -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.34",
|
"version": "0.1.35",
|
||||||
"dependencies": ["conversation"],
|
"dependencies": ["conversation"],
|
||||||
"after_dependencies": ["hassio", "lovelace"]
|
"after_dependencies": ["hassio", "lovelace"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* + subscribes to openclaw_message_received events.
|
* + subscribes to openclaw_message_received events.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const CARD_VERSION = "0.3.2";
|
const CARD_VERSION = "0.3.3";
|
||||||
|
|
||||||
// Max time (ms) to show the thinking indicator before falling back to an error
|
// Max time (ms) to show the thinking indicator before falling back to an error
|
||||||
const THINKING_TIMEOUT_MS = 120_000;
|
const THINKING_TIMEOUT_MS = 120_000;
|
||||||
@@ -131,6 +131,7 @@ class OpenClawChatCard extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
|
this._subscribeToEvents();
|
||||||
this._syncHistoryFromBackend();
|
this._syncHistoryFromBackend();
|
||||||
this._loadIntegrationSettings();
|
this._loadIntegrationSettings();
|
||||||
this._render();
|
this._render();
|
||||||
@@ -425,6 +426,8 @@ class OpenClawChatCard extends HTMLElement {
|
|||||||
async _sendMessage(text) {
|
async _sendMessage(text) {
|
||||||
if (!text || !text.trim() || !this._hass) return;
|
if (!text || !text.trim() || !this._hass) return;
|
||||||
|
|
||||||
|
await this._subscribeToEvents();
|
||||||
|
|
||||||
const message = text.trim();
|
const message = text.trim();
|
||||||
this._addMessage("user", message);
|
this._addMessage("user", message);
|
||||||
|
|
||||||
@@ -447,6 +450,10 @@ class OpenClawChatCard extends HTMLElement {
|
|||||||
message: message,
|
message: message,
|
||||||
session_id: this._config.session_id || undefined,
|
session_id: this._config.session_id || undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this._syncHistoryFromBackend(1);
|
||||||
|
}, 1200);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("OpenClaw: Failed to send message:", err);
|
console.error("OpenClaw: Failed to send message:", err);
|
||||||
// Replace thinking with error
|
// Replace thinking with error
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
if (!customElements.get("openclaw-chat-card")) {
|
if (!customElements.get("openclaw-chat-card")) {
|
||||||
const src = "/openclaw/openclaw-chat-card.js?v=0.1.34";
|
const src = "/openclaw/openclaw-chat-card.js?v=0.1.35";
|
||||||
console.info("OpenClaw loader importing", src);
|
console.info("OpenClaw loader importing", src);
|
||||||
await import(src);
|
await import(src);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user