Update version to 0.1.40 and add OpenClaw Gateway tools endpoint integration with new service and event support

This commit is contained in:
techartdev
2026-02-20 23:18:37 +02:00
parent 367541044c
commit faa962d8bc
16 changed files with 526 additions and 18 deletions
+55
View File
@@ -23,8 +23,10 @@ OpenClaw is a Home Assistant custom integration that connects your HA instance t
- **Services**
- `openclaw.send_message`
- `openclaw.clear_history`
- `openclaw.invoke_tool`
- **Event**
- `openclaw_message_received`
- `openclaw_tool_invoked`
- **Sensors / status entities** for model and connection state
---
@@ -191,6 +193,31 @@ data:
session_id: "living-room-session"
```
### `openclaw.invoke_tool`
Invoke a single OpenClaw Gateway tool directly.
Fields:
- `tool` (required)
- `action` (optional)
- `args` (optional object)
- `session_key` (optional)
- `dry_run` (optional)
- `message_channel` (optional)
- `account_id` (optional)
Example:
```yaml
service: openclaw.invoke_tool
data:
tool: sessions_list
action: json
args: {}
session_key: main
```
---
## Event
@@ -217,6 +244,34 @@ action:
message: "{{ trigger.event.data.message }}"
```
### `openclaw_tool_invoked`
Fired when `openclaw.invoke_tool` completes.
Event data includes:
- `tool`
- `ok`
- `result`
- `error`
- `duration_ms`
- `timestamp`
Automation example:
```yaml
trigger:
- platform: event
event_type: openclaw_tool_invoked
condition:
- condition: template
value_template: "{{ trigger.event.data.ok == false }}"
action:
- service: notify.mobile_app_phone
data:
message: "Tool {{ trigger.event.data.tool }} failed: {{ trigger.event.data.error }}"
```
---
## Troubleshooting