Refactor BearClaw automation to replace Telegram script calls with REST command integration. Updated message formatting to include job ID and user context for improved interaction handling.

pull/1590/head
Carlo Costanzo 3 weeks ago
parent 5016ce55d6
commit a3735f505c

@ -155,16 +155,20 @@ automation:
- condition: template - condition: template
value_template: "{{ action_name == 'yes' }}" value_template: "{{ action_name == 'yes' }}"
sequence: sequence:
- service: script.joanna_send_telegram - service: rest_command.bearclaw_command
data: data:
message: "Great, I received your confirmation." text: "{{ 'yes ' ~ job_id if job_id | length > 0 else 'Yes.' }}"
user: "{{ from_user }}"
source: telegram_callback
- conditions: - conditions:
- condition: template - condition: template
value_template: "{{ action_name == 'no' }}" value_template: "{{ action_name == 'no' }}"
sequence: sequence:
- service: script.joanna_send_telegram - service: rest_command.bearclaw_command
data: data:
message: "Understood. I did not get confirmation." text: "{{ 'no ' ~ job_id if job_id | length > 0 else 'No.' }}"
user: "{{ from_user }}"
source: telegram_callback
default: default:
- service: script.joanna_send_telegram - service: script.joanna_send_telegram
data: data:

Loading…
Cancel
Save

Powered by TurnKey Linux.