If I have multiple actions, do they get executed sequentially? I’m trying to get an AI response into a variable and then use that in the notification,
Here’s the config I’m using:
alias: Low battery Notification
description: ""
use_blueprint:
path: Blackshome/low-battery-notifications-and-actions.yaml
input:
include_time: time_disabled
time: "10:45:00"
weekday_options:
- mon
- tue
- wed
- thu
- fri
include_easy_notify: disabled_easy_notify
custom_actions:
- action: ai_task.generate_data
metadata: {}
data:
instructions: >-
You are Alfred Pennyworth (Michael Caine version, from the Nolan
Batman trilogy). Give me a one-sentence notification for Master
Grimshaw that there are batteries that need replacing. Be wise, a
bit dry, and stay in character.
task_name: Generate notification
response_variable: alfred_response
- action: assist_satellite.announce
metadata: {}
data:
message: "{{ alfred_response.data }}"
preannounce: true
include_button: enable_button_trigger
button_entity: input_button.check_low_battery
but in the logs I’m getting an error:
Logger: homeassistant.components.automation.low_battery_notification
Source: components/automation/__init__.py:724
integration: Automation (documentation, issues)
First occurred: 10:45:00 (3 occurrences)
Last logged: 10:59:42
Error rendering variables: UndefinedError: 'alfred_response' is undefined
Is it trying to render the response too early?