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
+5
View File
@@ -2,6 +2,11 @@
All notable changes to the OpenClaw Home Assistant Integration will be documented in this file.
## [0.1.51] - 2026-02-23
### Fixed
- Fixed chat input focus loss while typing by preventing unnecessary card re-renders on frequent Home Assistant state updates.
## [0.1.50] - 2026-02-21
### Fixed
+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,13 +127,37 @@ 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();
}
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() {
const states = this._hass?.states || {};
+1 -1
View File
@@ -1,7 +1,7 @@
(async () => {
try {
if (!customElements.get("openclaw-chat-card")) {
const src = "/openclaw/openclaw-chat-card.js?v=0.1.50";
const src = "/openclaw/openclaw-chat-card.js?v=0.1.51";
console.info("OpenClaw loader importing", src);
await import(src);
}