AngryRobot
(David Longley)
February 24, 2026, 7:04pm
1
I am trying to display the generated text from an ai_task on my MAX7219 matrix display, but the variable comes across as literal. What am I doing wrong?
alias: Funny Joke
description: ""
triggers:
- trigger: event
event_type: ""
conditions: []
actions:
- action: ai_task.generate_data
metadata: {}
data:
task_name: Joke
instructions: Tell me a funny joke.
entity_id: ai_task.google_ai_task
response_variable: generated_text
- device_id: 1fc2ddb9e05a1aa818dbfe15c38f21be
domain: text
entity_id: text.matrix_display_message
type: set_value
value: "{{generated_text.data}}"
mode: single
Hellis81
(Hellis81)
February 25, 2026, 9:11am
2
You are using a device action.
They don’t support templates.
AngryRobot
(David Longley)
February 25, 2026, 4:40pm
3
Thanks. How do I accomplish what I am trying to do? I am a noob.
Hellis81
(Hellis81)
February 25, 2026, 5:51pm
4
I don’t know. You need to find the normal action.
Perhaps set_text? Or something like it
AngryRobot
(David Longley)
February 25, 2026, 10:09pm
5
Would it help if I showed you the YAML for my Matrix Display?
AngryRobot
(David Longley)
February 26, 2026, 7:23pm
7
Excuse my ignorance, but where should I use the text.set_value? in my automation? What line?
Hellis81
(Hellis81)
February 26, 2026, 7:37pm
8
Click on add action, press the search field, type “text_set”.
AngryRobot
(David Longley)
February 27, 2026, 10:02pm
9
That WORKED!!! Thank you! Now, how do I format the generated text to a space at he beginning of the text and replace the Carriage Return with maybe a “-” or something?
Hellis81
(Hellis81)
February 28, 2026, 8:14am
10
"{{' ' ~ generated_text.data | replace('\n', ' - ' }}"
Hellis81
(Hellis81)
March 3, 2026, 4:35am
12
It’s missing a closing parantes.
My bad sorry…
AngryRobot
(David Longley)
March 3, 2026, 10:31pm
13
AHA! No worries and thank you!