Bump version to 0.1.51, fix chat input focus loss, and update card version

This commit is contained in:
techartdev
2026-02-23 11:14:18 +02:00
parent 7a8c0ae71d
commit 8f82526bb9
5 changed files with 35 additions and 5 deletions
+1 -1
View File
@@ -92,7 +92,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.50"
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.51"
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.50",
"version": "0.1.51",
"dependencies": ["conversation"],
"after_dependencies": ["hassio", "lovelace"]
}
@@ -13,7 +13,7 @@
* + subscribes to openclaw_message_received events.
*/
const CARD_VERSION = "0.3.9";
const CARD_VERSION = "0.3.10";
// Max time (ms) to show the thinking indicator before falling back to an error
const THINKING_TIMEOUT_MS = 120_000;
@@ -94,6 +94,7 @@ class OpenClawChatCard extends HTMLElement {
this._assistAutoStopTimer = null;
this._lastAssistantEventSignature = null;
this._autoScrollPinned = true;
this._lastHassRenderSignature = null;
}
// ── HA card interface ───────────────────────────────────────────────
@@ -126,12 +127,36 @@ class OpenClawChatCard extends HTMLElement {
set hass(hass) {
const firstSet = !this._hass;
this._hass = hass;
const currentSignature = this._getHassRenderSignature(hass);
if (firstSet) {
this._subscribeToEvents();
this._syncHistoryFromBackend();
this._loadIntegrationSettings();
}
this._render();
if (firstSet || currentSignature !== this._lastHassRenderSignature) {
this._lastHassRenderSignature = currentSignature;
this._render();
}
}
_getHassRenderSignature(hass) {
const states = hass?.states || {};
const stateEntries = Object.entries(states);
const statusEntity =
states["sensor.openclaw_status"] ||
stateEntries.find(([entityId]) => entityId.startsWith("sensor.openclaw_status"))?.[1] ||
null;
const binaryEntity =
states["binary_sensor.openclaw_connected"] ||
stateEntries.find(([entityId]) => entityId.startsWith("binary_sensor.openclaw_connected"))?.[1] ||
null;
const status = String(statusEntity?.state || "").toLowerCase();
const connectedState = String(binaryEntity?.state || "").toLowerCase();
return `${status}|${connectedState}`;
}
_getGatewayConnectionState() {