Generate Content and AI Task

Good morning!

So… since “Gemini Generate Content” is deprecated I was trying to switch everything to “AI TASK” with Google but I’m having problems.

This was my action to Generate Content (working but deprecated)

action: google_generative_ai_conversation.generate_content
metadata: {}
data:
  prompt: >-
    Say good morning
response_variable: response
enabled: true

then to let my speaker speak:

action: assist_satellite.announce
metadata: {}
data:
  message: "\"{{ response.text }}\""
  preannounce: true
target:
  entity_id: assist_satellite.assistant_esp32s3_test2_assist_satellite

I can’t perform the same action with the new “AI Task.” Can you help me?

I tried this but it doesn’t work:

action: ai_task.generate_data
metadata: {}
data:
  entity_id: ai_task.google_ai_task
  task_name: Test 1
  instructions: say good morning
response_variable: response

and for the speaker:

action: assist_satellite.announce
metadata: {}
data:
  message: "\"{{ response.text }}\""
  preannounce: true
target:
  entity_id: assist_satellite.respeaker_assist_satellite

I’m having a problem getting my respeaker to read my response as if my message {{ response.text }} is not correct and/or up to date.

I succeeded after hours of trying…

{{ response.data }}

the correct message is:

action: assist_satellite.announce
metadata: {}
data:
  message: "\"{{ response.data }}\""
  preannounce: true
target:
  entity_id: assist_satellite.respeaker_assist_satellite
1 Like

Thanks! I was just trying to get it to message me about the Laundry being done, but that Message was the missing part I needed!

Which is very easy to understand… it’s all written on the official integration page.

I still have a lot to learn…