fixing messages in stt mode

This commit is contained in:
techartdev
2026-02-20 22:04:04 +02:00
parent 726ceb3ef6
commit 76c16a5111
5 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -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)
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
# 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
+1 -1
View File
@@ -8,7 +8,7 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
"requirements": [],
"version": "0.1.34",
"version": "0.1.35",
"dependencies": ["conversation"],
"after_dependencies": ["hassio", "lovelace"]
}
@@ -13,7 +13,7 @@
* + 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
const THINKING_TIMEOUT_MS = 120_000;
@@ -131,6 +131,7 @@ class OpenClawChatCard extends HTMLElement {
}
connectedCallback() {
this._subscribeToEvents();
this._syncHistoryFromBackend();
this._loadIntegrationSettings();
this._render();
@@ -425,6 +426,8 @@ class OpenClawChatCard extends HTMLElement {
async _sendMessage(text) {
if (!text || !text.trim() || !this._hass) return;
await this._subscribeToEvents();
const message = text.trim();
this._addMessage("user", message);
@@ -447,6 +450,10 @@ class OpenClawChatCard extends HTMLElement {
message: message,
session_id: this._config.session_id || undefined,
});
setTimeout(() => {
this._syncHistoryFromBackend(1);
}, 1200);
} catch (err) {
console.error("OpenClaw: Failed to send message:", err);
// Replace thinking with error