Update version to 0.1.36 and enhance changelog with fixes for voice mode and message deduplication
This commit is contained in:
@@ -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.35"
|
||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.36"
|
||||
|
||||
OpenClawConfigEntry = ConfigEntry
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"iot_class": "local_polling",
|
||||
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
|
||||
"requirements": [],
|
||||
"version": "0.1.35",
|
||||
"version": "0.1.36",
|
||||
"dependencies": ["conversation"],
|
||||
"after_dependencies": ["hassio", "lovelace"]
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* + subscribes to openclaw_message_received events.
|
||||
*/
|
||||
|
||||
const CARD_VERSION = "0.3.3";
|
||||
const CARD_VERSION = "0.3.4";
|
||||
|
||||
// Max time (ms) to show the thinking indicator before falling back to an error
|
||||
const THINKING_TIMEOUT_MS = 120_000;
|
||||
@@ -86,6 +86,7 @@ class OpenClawChatCard extends HTMLElement {
|
||||
this._assistAudioChunks = [];
|
||||
this._assistInputSampleRate = 16000;
|
||||
this._assistAutoStopTimer = null;
|
||||
this._lastAssistantEventSignature = null;
|
||||
}
|
||||
|
||||
// ── HA card interface ───────────────────────────────────────────────
|
||||
@@ -181,6 +182,12 @@ class OpenClawChatCard extends HTMLElement {
|
||||
const sessionId = this._getSessionId();
|
||||
if (data.session_id && data.session_id !== sessionId) return;
|
||||
|
||||
const signature = `${sessionId}|${data.timestamp || ""}|${String(data.message)}`;
|
||||
if (signature === this._lastAssistantEventSignature) {
|
||||
return;
|
||||
}
|
||||
this._lastAssistantEventSignature = signature;
|
||||
|
||||
const thinkingIdx = this._messages.findIndex((m) => m._thinking);
|
||||
if (thinkingIdx >= 0) {
|
||||
this._messages[thinkingIdx] = {
|
||||
@@ -569,6 +576,12 @@ class OpenClawChatCard extends HTMLElement {
|
||||
|
||||
_startVoiceRecognition() {
|
||||
const provider = this._getVoiceProvider();
|
||||
if (this._isVoiceMode && provider === "assist_stt") {
|
||||
this._voiceStatus =
|
||||
"Voice mode uses browser speech for continuous listening (Assist STT remains available for manual mic).";
|
||||
this._startBrowserVoiceRecognition();
|
||||
return;
|
||||
}
|
||||
if (provider === "assist_stt") {
|
||||
this._startAssistSttRecognition();
|
||||
return;
|
||||
@@ -1150,13 +1163,6 @@ class OpenClawChatCard extends HTMLElement {
|
||||
}
|
||||
|
||||
_toggleVoiceMode() {
|
||||
if (!this._isVoiceMode && this._getVoiceProvider() === "assist_stt") {
|
||||
this._voiceStatus =
|
||||
"Continuous voice mode is only available with browser voice provider.";
|
||||
this._render();
|
||||
return;
|
||||
}
|
||||
|
||||
this._isVoiceMode = !this._isVoiceMode;
|
||||
if (this._isVoiceMode) {
|
||||
this._startVoiceRecognition();
|
||||
|
||||
Reference in New Issue
Block a user