Bump OpenClaw to version 0.5.72 and add repair for known invalid config settings

This commit is contained in:
techartdev
2026-05-04 10:19:53 +03:00
parent c769cb88e1
commit 3e5e0877b1
5 changed files with 74 additions and 2 deletions
+5
View File
@@ -2,6 +2,11 @@
All notable changes to the OpenClaw Assistant Home Assistant Add-on will be documented in this file.
## [0.5.72] - 2026-05-04
### Fixed
- Repair startup when a persisted OpenClaw config still selects the unavailable `tools.web.search.provider=brave` provider. The add-on now clears that provider before launching the gateway so OpenClaw can start; users can reinstall/enable the Brave provider later if they want web search through Brave.
## [0.5.70] - 2026-04-30
- Bump OpenClaw to 2026.4.27.
+1 -1
View File
@@ -1,5 +1,5 @@
name: OpenClaw Assistant
version: "0.5.71"
version: "0.5.72"
slug: openclaw_assistant
description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on.
url: https://github.com/techartdev/OpenClawHomeAssistant
+44
View File
@@ -256,6 +256,43 @@ def set_control_ui_origins(origins_csv: str, additional_origins_csv: str = "", d
return False
def repair_known_invalid_settings():
"""Repair known config values that prevent OpenClaw from starting."""
cfg = read_config()
if cfg is None:
return True
tools = cfg.get("tools")
if not isinstance(tools, dict):
return True
web = tools.get("web")
if not isinstance(web, dict):
return True
search = web.get("search")
if not isinstance(search, dict):
return True
provider = search.get("provider")
changes = []
if provider == "brave":
del search["provider"]
changes.append("removed unavailable tools.web.search.provider=brave")
if not changes:
print("INFO: No known invalid OpenClaw config settings found")
return True
if write_config(cfg):
print(f"INFO: Repaired OpenClaw config: {', '.join(changes)}")
return True
print("ERROR: Failed to write config")
return False
def main():
"""CLI entry point for use by run.sh"""
if len(sys.argv) < 2:
@@ -300,6 +337,13 @@ def main():
success = set_control_ui_origins(origins_csv, additional_origins_csv, disable_device_auth)
sys.exit(0 if success else 1)
elif cmd == "repair-known-invalid-settings":
if len(sys.argv) != 2:
print("Usage: oc_config_helper.py repair-known-invalid-settings")
sys.exit(1)
success = repair_known_invalid_settings()
sys.exit(0 if success else 1)
elif cmd == "set":
if len(sys.argv) != 4:
print("Usage: oc_config_helper.py set <key> <value>")
+12 -1
View File
@@ -562,9 +562,20 @@ fi
if [ -f "$OPENCLAW_CONFIG_PATH" ]; then
if [ -f "$HELPER_PATH" ]; then
if python3 "$HELPER_PATH" repair-known-invalid-settings; then
:
else
rc=$?
echo "ERROR: Failed to repair known invalid OpenClaw config settings via oc_config_helper.py (exit code ${rc})."
echo "ERROR: Gateway configuration may be invalid; aborting startup."
exit "${rc}"
fi
# In lan_https mode the gateway uses an internal port; nginx owns the external one.
EFFECTIVE_GW_PORT="$GATEWAY_INTERNAL_PORT"
if ! python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_REMOTE_URL" "$GATEWAY_BIND_MODE" "$EFFECTIVE_GW_PORT" "$ENABLE_OPENAI_API" "$GATEWAY_AUTH_MODE" "$GATEWAY_TRUSTED_PROXIES"; then
if python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_REMOTE_URL" "$GATEWAY_BIND_MODE" "$EFFECTIVE_GW_PORT" "$ENABLE_OPENAI_API" "$GATEWAY_AUTH_MODE" "$GATEWAY_TRUSTED_PROXIES"; then
:
else
rc=$?
echo "ERROR: Failed to apply gateway settings via oc_config_helper.py (exit code ${rc})."
echo "ERROR: Gateway configuration may be incorrect; aborting startup."